فهرست منبع

libssh2: add mbedtls backend

libssh2 support mbedtls as crypto back-end library since version 1.8.0.

Default to mbedtls since it's smaller than either libgcrypt or openssl.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Baruch Siach 8 سال پیش
والد
کامیت
714df4cfed
2فایلهای تغییر یافته به همراه10 افزوده شده و 6 حذف شده
  1. 1 1
      package/libssh2/Config.in
  2. 9 5
      package/libssh2/libssh2.mk

+ 1 - 1
package/libssh2/Config.in

@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LIBSSH2
 config BR2_PACKAGE_LIBSSH2
 	bool "libssh2"
 	bool "libssh2"
-	select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_LIBGCRYPT
+	select BR2_PACKAGE_OPENSSL if !(BR2_PACKAGE_MBEDTLS || BR2_PACKAGE_LIBGCRYPT)
 	help
 	help
 	  libssh2 is a client-side C library implementing the SSH2
 	  libssh2 is a client-side C library implementing the SSH2
 	  protocol as defined by Internet Drafts: SECSH-TRANS(22),
 	  protocol as defined by Internet Drafts: SECSH-TRANS(22),

+ 9 - 5
package/libssh2/libssh2.mk

@@ -11,12 +11,16 @@ LIBSSH2_LICENSE_FILES = COPYING
 LIBSSH2_INSTALL_STAGING = YES
 LIBSSH2_INSTALL_STAGING = YES
 LIBSSH2_CONF_OPTS = --disable-examples-build
 LIBSSH2_CONF_OPTS = --disable-examples-build
 
 
-# Dependency is either on libgcrypt or openssl, guaranteed in Config.in.
-# Favour libgcrypt.
-ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
+# Dependency is one of mbedtls, libgcrypt or openssl, guaranteed in
+# Config.in. Favour mbedtls.
+ifeq ($(BR2_PACKAGE_MBEDTLS),y)
+LIBSSH2_DEPENDENCIES += mbedtls
+LIBSSH2_CONF_OPTS += --with-mbedtls=$(STAGING_DIR)/usr \
+	--without-openssl --without-libgcrypt
+else ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
 LIBSSH2_DEPENDENCIES += libgcrypt
 LIBSSH2_DEPENDENCIES += libgcrypt
 LIBSSH2_CONF_OPTS += --with-libgcrypt=$(STAGING_DIR)/usr \
 LIBSSH2_CONF_OPTS += --with-libgcrypt=$(STAGING_DIR)/usr \
-	--without-openssl
+	--without-openssl --without-mbedtls
 # configure.ac forgets to link to dependent libraries of gcrypt breaking static
 # configure.ac forgets to link to dependent libraries of gcrypt breaking static
 # linking
 # linking
 LIBSSH2_CONF_ENV += LIBS="`$(STAGING_DIR)/usr/bin/libgcrypt-config --libs`"
 LIBSSH2_CONF_ENV += LIBS="`$(STAGING_DIR)/usr/bin/libgcrypt-config --libs`"
@@ -24,7 +28,7 @@ else
 LIBSSH2_DEPENDENCIES += openssl
 LIBSSH2_DEPENDENCIES += openssl
 LIBSSH2_CONF_OPTS += --with-openssl \
 LIBSSH2_CONF_OPTS += --with-openssl \
 	--with-libssl-prefix=$(STAGING_DIR)/usr \
 	--with-libssl-prefix=$(STAGING_DIR)/usr \
-	--without-libgcrypt
+	--without-libgcrypt --without-mbedtls
 endif
 endif
 
 
 # Add zlib support if enabled
 # Add zlib support if enabled