dropbear: bump to 2019.78
[openwrt/staging/wigyori.git] / package / network / services / dropbear / Makefile
index 768cc813fa1f2664597cf78f1ea65336334a00ec..22b769f1529a7786cc588e962f60bc107f3f1e9e 100644 (file)
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dropbear
-PKG_VERSION:=2019.77
+PKG_VERSION:=2019.78
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:= \
        http://matt.ucc.asn.au/dropbear/releases/ \
        https://dropbear.nl/mirror/releases/
-PKG_HASH:=d91f78ebe633be1d071fd1b7e5535b9693794048b019e9f4bea257e1992b458d
+PKG_HASH:=525965971272270995364a0eb01f35180d793182e63dd0b0c3eb0292291644a4
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE libtomcrypt/LICENSE libtommath/LICENSE
@@ -26,7 +26,7 @@ PKG_USE_MIPS16:=0
 PKG_FIXUP:=autoreconf
 
 PKG_CONFIG_DEPENDS:= \
-       CONFIG_TARGET_INIT_PATH CONFIG_DROPBEAR_ECC \
+       CONFIG_TARGET_INIT_PATH CONFIG_DROPBEAR_ECC CONFIG_DROPBEAR_ECC_FULL \
        CONFIG_DROPBEAR_CURVE25519 CONFIG_DROPBEAR_ZLIB \
        CONFIG_DROPBEAR_UTMP CONFIG_DROPBEAR_PUTUTLINE
 
@@ -61,6 +61,7 @@ define Package/dropbear/description
 endef
 
 define Package/dropbear/conffiles
+$(if $(CONFIG_DROPBEAR_ECC),/etc/dropbear/dropbear_ecdsa_host_key)
 /etc/dropbear/dropbear_rsa_host_key
 /etc/config/dropbear
 endef
@@ -118,6 +119,12 @@ define Build/Configure
                        $(PKG_BUILD_DIR)/localoptions.h; \
        done
 
+       # enable nistp384 and nistp521 only if full ECC support was requested
+       for OPTION in DROPBEAR_ECC_384 DROPBEAR_ECC_521; do \
+               $(ESED) 's,^(#define '$$$$OPTION') .*$$$$,\1 $(if $(CONFIG_DROPBEAR_ECC_FULL),1,0),g' \
+               $(PKG_BUILD_DIR)/sysoptions.h; \
+       done
+
        # Enforce rebuild of svr-chansession.c
        rm -f $(PKG_BUILD_DIR)/svr-chansession.o
 endef
@@ -144,6 +151,7 @@ define Package/dropbear/install
        $(INSTALL_BIN) ./files/dropbear.init $(1)/etc/init.d/dropbear
        $(INSTALL_DIR) $(1)/usr/lib/opkg/info
        $(INSTALL_DIR) $(1)/etc/dropbear
+       $(if $(CONFIG_DROPBEAR_ECC),touch $(1)/etc/dropbear/dropbear_ecdsa_host_key)
        touch $(1)/etc/dropbear/dropbear_rsa_host_key
 endef