1711222655
Features and Changes: Note >> for compatibility/configuration changes - >> Disable DROPBEAR_DSS by default It is only 1024 bit and uses sha1, most distros disable it by default already. - Added DROPBEAR_RSA_SHA1 option to allow disabling sha1 rsa signatures. >> RSA with sha1 will be disabled in a future release (rsa keys will continue to work OK, with sha256 signatures used instead). - Add option for requiring both password and pubkey (-t) Patch from Jackkal - Add 'no-touch-required' and 'verify-required' options for sk keys Patch from Egor Duda - >> DROPBEAR_SK_KEYS config option now replaces separate DROPBEAR_SK_ECDSA and DROPBEAR_SK_ED25519 options. - Add 'permitopen' option for authorized_keys to restrict forwarded ports Patch from Tuomas Haikarainen - >> Added LTM_CFLAGS configure argument to set flags for building bundled libtommath. This also restores the previous arguments used in 2020.81 (-O3 -funroll-loops). That gives a big speedup for RSA key generation, which regressed in 2022.82. There is a tradeoff with code size, so -Os can be used if required. https://github.com/mkj/dropbear/issues/174 Reported by David Bernard - Add '-z' flag to disable setting QoS traffic class. This may be necessary to work with broken networks or network drivers, exposed after changes to use AF21 in 2022.82 https://github.com/mkj/dropbear/issues/193 Reported by yuhongwei380, patch from Petr Štetiar - Allow overriding user shells with COMPAT_USER_SHELLS Based on a patch from Matt Robinson - Improve permission error message Patch from k-kurematsu - >> Remove HMAC_MD5 entirely Regression fixes from 2022.82: - Fix X11 build - Fix build warning - Fix compilation when disabling pubkey authentication Patch from MaxMougg - Fix MAX_UNAUTH_CLIENTS regression Reported by ptpt52 - Avoid using slower prime testing in bundled libtomcrypt when DSS is disabled https://github.com/mkj/dropbear/issues/174 Suggested by Steffen Jaeckel - Fix Dropbear plugin support https://github.com/mkj/dropbear/issues/194 Reported by Struan Bartlett Other fixes: - Fix long standing incorrect compression size check. Dropbear (client or server) would erroneously exit with "bad packet, oversized decompressed" when receiving a compressed packet of exactly the maximum size. - Fix missing setsid() removed in 2020.79 https://github.com/mkj/dropbear/issues/180 Reported and debugged by m5jt and David Bernard - Try keyboard-interactive auth before password, in dbclient. This was unintentionally changed back in 2013 https://github.com/mkj/dropbear/pull/190 Patch from Michele Giacomoli - Drain the terminal when reading the fingerprint confirmation response https://github.com/mkj/dropbear/pull/191 Patch from Michele Giacomoli - Fix utx wtmp variable typo. This has been wrong for a long time but only recently became a problem when wtmp was detected. https://github.com/mkj/dropbear/pull/189 Patch from Michele Giacomoli - Improve configure test for hardening options. Fixes building on AIX https://github.com/mkj/dropbear/issues/158 - Fix debian/dropbear.init newline From wulei-student Infrastructure: - Test off-by-default compile options - Set -Wundef to catch typos in #if statements
155 lines
5.2 KiB
Makefile
155 lines
5.2 KiB
Makefile
PORTNAME= dropbear
|
|
PORTVERSION= 2022.83
|
|
CATEGORIES= security
|
|
MASTER_SITES= https://matt.ucc.asn.au/dropbear/releases/
|
|
|
|
MAINTAINER= pkubaj@FreeBSD.org
|
|
COMMENT= SSH 2 server, designed to be usable in small memory environments
|
|
WWW= https://matt.ucc.asn.au/dropbear/dropbear.html
|
|
|
|
LICENSE= MIT
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE
|
|
|
|
USES= cpe gmake tar:bzip2
|
|
CPE_VENDOR= dropbear_ssh_project
|
|
CPE_PRODUCT= dropbear_ssh
|
|
|
|
GNU_CONFIGURE= yes
|
|
USE_RC_SUBR= ${PORTNAME}
|
|
ALL_TARGET= all scp
|
|
|
|
OPTIONS_DEFINE= SMALL_CODE STATIC X11FWD
|
|
OPTIONS_DEFAULT= AES128 AES256 CURVE25519 ECDSA ED25519 GCM \
|
|
GROUP14_SHA256 GROUP16 RSA SHA2_256
|
|
OPTIONS_MULTI= ENC KEY KEX MAC MODE
|
|
OPTIONS_MULTI_ENC= 3DES AES128 AES256 CHACHA20POLY1305
|
|
OPTIONS_MULTI_KEY= DSS ECDSA ED25519 RSA
|
|
OPTIONS_MULTI_KEX= CURVE25519 ECDH GROUP1 GROUP14_SHA1 GROUP14_SHA256 \
|
|
GROUP16
|
|
OPTIONS_MULTI_MAC= MD5 RSA_SHA1 SHA1 SHA1_96 SHA2_256 SHA2_512
|
|
OPTIONS_MULTI_MODE= CBC CTR GCM
|
|
|
|
3DES_DESC= Enable 3DES-based encryption
|
|
AES128_DESC= Enable AES128-based encryption
|
|
AES256_DESC= Enable AES256-based encryption
|
|
CBC_DESC= Use CBC mode for ciphers (less secure)
|
|
CHACHA20POLY1305_DESC= Enable chacha20poly1305-based encryption
|
|
CTR_DESC= Use CTR mode for ciphers
|
|
CURVE25519_DESC= Enable Curve25519
|
|
DSS_DESC= Enable DSS (insecure)
|
|
ECDH_DESC= Enable ECDH (insecure)
|
|
ECDSA_DESC= Enable ECDSA public key support
|
|
ED25519_DESC= Enable ED25519 public key support
|
|
GCM_DESC= Enable GCM mode for ciphers (more secure)
|
|
GROUP14_SHA1_DESC= Enable Group14 Diffie-Helman with SHA1 (insecure)
|
|
GROUP14_SHA256_DESC= Enable Group14 Diffie-Helman with SHA256
|
|
GROUP16_DESC= Enable Group16 Diffie-Hellman
|
|
GROUP1_DESC= Enable Group1 Diffie-Hellman (insecure)
|
|
MD5_DESC= Enable MD5 MAC (broken)
|
|
RSA_DESC= Enable RSA public key support
|
|
RSA_SHA1_DESC= Enable RSA SHA1 MAC (insecure)
|
|
SHA1_96_DESC= Enable SHA1_96 MAC (less secure)
|
|
SHA1_DESC= Enable SHA1 MAC (less secure)
|
|
SHA2_256_DESC= Enable SHA2_256 MAC
|
|
SHA2_512_DESC= Enable SHA2_512 MAC
|
|
SMALL_CODE_DESC= Make binary smaller in exchange for 50% performance hit
|
|
X11FWD_DESC= Enable X11 forwarding
|
|
|
|
3DES_IMPLIES= CTR
|
|
CBC_IMPLIES= CTR
|
|
|
|
STATIC_CONFIGURE_ENABLE= static
|
|
|
|
post-patch:
|
|
@${REINPLACE_CMD} -e "s,_PRIV_FILENAME \"/etc/,_PRIV_FILENAME \"${PREFIX}/etc/,g; \
|
|
s,/usr/bin/X11/,${LOCALBASE}/,g" ${WRKSRC}/default_options.h
|
|
|
|
post-patch-SMALL_CODE-off:
|
|
@${ECHO} "#define DROPBEAR_SMALL_CODE 0" >> ${WRKSRC}/localoptions.h
|
|
|
|
post-patch-3DES-on:
|
|
@${ECHO} "#define DROPBEAR_3DES 1" >> ${WRKSRC}/localoptions.h
|
|
|
|
post-patch-AES128-off:
|
|
@${ECHO} "#define DROPBEAR_AES128 0" >> ${WRKSRC}/localoptions.h
|
|
|
|
post-patch-AES256-off:
|
|
@${ECHO} "#define DROPBEAR_AES256 0" >> ${WRKSRC}/localoptions.h
|
|
|
|
post-patch-CHACHA20POLY1305-off:
|
|
@${ECHO} "#define DROPBEAR_CHACHA20POLY1305 0" >> ${WRKSRC}/localoptions.h
|
|
|
|
post-patch-CBC-on:
|
|
@${ECHO} "#define DROPBEAR_ENABLE_CBC_MODE 1" >> ${WRKSRC}/localoptions.h
|
|
|
|
post-patch-CTR-off:
|
|
@${ECHO} "#define DROPBEAR_ENABLE_CTR_MODE 0" >> ${WRKSRC}/localoptions.h
|
|
|
|
post-patch-GCM-on:
|
|
@${ECHO} "#define DROPBEAR_ENABLE_GCM_MODE 1" >> ${WRKSRC}/localoptions.h
|
|
|
|
post-patch-CURVE25519-off:
|
|
@${ECHO} "#define DROPBEAR_CURVE25519 0" >> ${WRKSRC}/localoptions.h
|
|
|
|
post-patch-DSS-on:
|
|
@${ECHO} "#define DROPBEAR_DSS 1" >> ${WRKSRC}/localoptions.h
|
|
|
|
post-patch-ECDH-off:
|
|
@${ECHO} "#define DROPBEAR_ECDH 0" >> ${WRKSRC}/localoptions.h
|
|
|
|
post-patch-GROUP1-off:
|
|
@${ECHO} "#define DROPBEAR_DH_GROUP1 0" >> ${WRKSRC}/localoptions.h
|
|
|
|
post-patch-GROUP14_SHA1-off:
|
|
@${ECHO} "#define DROPBEAR_DH_GROUP14_SHA1 0" >> ${WRKSRC}/localoptions.h
|
|
|
|
post-patch-GROUP14_SHA256-off:
|
|
@${ECHO} "#define DROPBEAR_DH_GROUP14_SHA256 0" >> ${WRKSRC}/localoptions.h
|
|
|
|
post-patch-GROUP16-on:
|
|
@${ECHO} "#define DROPBEAR_DH_GROUP16 1" >> ${WRKSRC}/localoptions.h
|
|
|
|
post-patch-RSA-off:
|
|
@${ECHO} "#define DROPBEAR_RSA 0" >> ${WRKSRC}/localoptions.h
|
|
|
|
post-patch-RSA_SHA1-off:
|
|
@${ECHO} "#define DROPBEAR_RSA_SHA1 0" >> ${WRKSRC}/localoptions.h
|
|
|
|
post-patch-ECDSA-off:
|
|
@${ECHO} "#define DROPBEAR_ECDSA 0" >> ${WRKSRC}/localoptions.h
|
|
|
|
post-patch-ED25519-off:
|
|
@${ECHO} "#define DROPBEAR_E25519 0" >> ${WRKSRC}/localoptions.h
|
|
|
|
post-patch-MD5-on:
|
|
@${ECHO} "#define DROPBEAR_MD5_HMAC 1" >> ${WRKSRC}/localoptions.h
|
|
|
|
post-patch-SHA1-off:
|
|
@${ECHO} "#define DROPBEAR_SHA1_HMAC 0" >> ${WRKSRC}/localoptions.h
|
|
|
|
post-patch-SHA1_96-off:
|
|
@${ECHO} "#define DROPBEAR_SHA1_96_HMAC 0" >> ${WRKSRC}/localoptions.h
|
|
|
|
post-patch-SHA2_256-off:
|
|
@${ECHO} "#define DROPBEAR_SHA2_256_HMAC 0" >> ${WRKSRC}/localoptions.h
|
|
|
|
post-patch-SHA2_512-on:
|
|
@${ECHO} "#define DROPBEAR_SHA2_512_HMAC 1" >> ${WRKSRC}/localoptions.h
|
|
|
|
post-patch-X11FWD-on:
|
|
@${ECHO} "#define DROPBEAR_X11FWD 1" >> ${WRKSRC}/localoptions.h
|
|
|
|
do-install:
|
|
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/dropbear
|
|
${INSTALL_PROGRAM} ${WRKSRC}/dbclient ${STAGEDIR}${PREFIX}/bin
|
|
${INSTALL_PROGRAM} ${WRKSRC}/dropbearconvert ${STAGEDIR}${PREFIX}/bin
|
|
${INSTALL_PROGRAM} ${WRKSRC}/dropbearkey ${STAGEDIR}${PREFIX}/bin
|
|
${INSTALL_PROGRAM} ${WRKSRC}/dropbear ${STAGEDIR}${PREFIX}/sbin
|
|
${INSTALL_PROGRAM} ${WRKSRC}/scp ${STAGEDIR}${PREFIX}/bin/dbscp
|
|
${INSTALL_MAN} ${WRKSRC}/dropbearconvert.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
|
|
${INSTALL_MAN} ${WRKSRC}/dropbearkey.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
|
|
${INSTALL_MAN} ${WRKSRC}/dbclient.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
|
|
${INSTALL_MAN} ${WRKSRC}/dropbear.8 ${STAGEDIR}${MAN8PREFIX}/man/man8
|
|
|
|
.include <bsd.port.mk>
|