Skip to contentSkip to conversation

libssh2: revert to previous crypto defaults

PATCH New Peter Korsgaard 2 participants 4 messages Nov 5, 2017 – Nov 6, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libssh2: revert to previous crypto defaults

The recent crypto handling change (commit 04a1031d3: package/libssh2: Add selectable crypto libraries) had the unfortunate side effect that it no longer automatically selects the most suitable crypto backend (E.G. one where the dependency is already enabled), so all users not wanting to use the mbedtls backend need to explicitly configure this.

Fix this by inverting the logic so the crypto backend sub options use 'depends on' their dependencies instead of 'select', so only the available backends are displayed.

Like before, default to openssl if no crypto backend dependencies are currently enabled.

---
 package/libssh2/Config.in | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
package/libssh2/Config.in +4 -4
index f2d32a90ae..90c38813b3 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LIBSSH2
 	bool "libssh2"
+	select BR2_PACKAGE_OPENSSL if !(BR2_PACKAGE_MBEDTLS || BR2_PACKAGE_LIBGCRYPT)
 	help
 	  libssh2 is a client-side C library implementing the SSH2
 	  protocol as defined by Internet Drafts: SECSH-TRANS(22),
@@ -17,16 +18,15 @@ choice
 
 config BR2_PACKAGE_LIBSSH2_MBEDTLS
 	bool "mbedtls"
-	select BR2_PACKAGE_MBEDTLS
+	depends on BR2_PACKAGE_MBEDTLS
 
 config BR2_PACKAGE_LIBSSH2_LIBGCRYPT
 	bool "gcrypt"
-	depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS # libgcrypt -> libgpg-error
-	select BR2_PACKAGE_LIBGCRYPT
+	depends on BR2_PACKAGE_LIBGCRYPT
 
 config BR2_PACKAGE_LIBSSH2_OPENSSL
 	bool "openssl"
-	select BR2_PACKAGE_OPENSSL
+	depends on BR2_PACKAGE_OPENSSL
 
 endchoice
 endif
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 libssh2: revert to previous crypto defaults

Hi Peter,

Quoted 6 lines · Peter Korsgaard

The recent crypto handling change (commit 04a1031d3: package/libssh2: Add selectable crypto libraries) had the unfortunate side effect that it no longer automatically selects the most suitable crypto backend (E.G. one where the dependency is already enabled), so all users not wanting to use the mbedtls backend need to explicitly configure this.

Quoted 6 lines

Fix this by inverting the logic so the crypto backend sub options use 'depends on' their dependencies instead of 'select', so only the available backends are displayed.

Like before, default to openssl if no crypto backend dependencies are currently enabled.

The CHANGES file needs an update. It currently says:

The default is mbedtls, even if you didn't have mbedtls selected before.

baruch

Quoted 37 lines
---
 package/libssh2/Config.in | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
package/libssh2/Config.in +4 -4
index f2d32a90ae..90c38813b3 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LIBSSH2
 	bool "libssh2"
+	select BR2_PACKAGE_OPENSSL if !(BR2_PACKAGE_MBEDTLS || BR2_PACKAGE_LIBGCRYPT)
 	help
 	  libssh2 is a client-side C library implementing the SSH2
 	  protocol as defined by Internet Drafts: SECSH-TRANS(22),
@@ -17,16 +18,15 @@ choice
 
 config BR2_PACKAGE_LIBSSH2_MBEDTLS
 	bool "mbedtls"
-	select BR2_PACKAGE_MBEDTLS
+	depends on BR2_PACKAGE_MBEDTLS
 
 config BR2_PACKAGE_LIBSSH2_LIBGCRYPT
 	bool "gcrypt"
-	depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS # libgcrypt -> libgpg-error
-	select BR2_PACKAGE_LIBGCRYPT
+	depends on BR2_PACKAGE_LIBGCRYPT
 
 config BR2_PACKAGE_LIBSSH2_OPENSSL
 	bool "openssl"
-	select BR2_PACKAGE_OPENSSL
+	depends on BR2_PACKAGE_OPENSSL
 
 endchoice
 endif
Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#2 lore raw

PATCH 1/1 libssh2: revert to previous crypto defaults

Quoted 14 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

Hi Peter,

Quoted 10 lines · Peter Korsgaard

The recent crypto handling change (commit 04a1031d3: package/libssh2: Add selectable crypto libraries) had the unfortunate side effect that it no longer automatically selects the most suitable crypto backend (E.G. one where the dependency is already enabled), so all users not wanting to use the mbedtls backend need to explicitly configure this.

Fix this by inverting the logic so the crypto backend sub options use 'depends on' their dependencies instead of 'select', so only the available backends are displayed.

Quoted 6 lines
Quoted 2 lines

Like before, default to openssl if no crypto backend dependencies are currently enabled.

The CHANGES file needs an update. It currently says:

The default is mbedtls, even if you didn't have mbedtls selected before.

Correct, that needs to adjusted when/if this gets applied.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 1/1 libssh2: revert to previous crypto defaults

In reply to Peter Korsgaard
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> writes:

The recent crypto handling change (commit 04a1031d3: package/libssh2: Add selectable crypto libraries) had the unfortunate side effect that it no longer automatically selects the most suitable crypto backend (E.G. one where the dependency is already enabled), so all users not wanting to use the mbedtls backend need to explicitly configure this.

Quoted 8 lines

Fix this by inverting the logic so the crypto backend sub options use 'depends on' their dependencies instead of 'select', so only the available backends are displayed.

Like before, default to openssl if no crypto backend dependencies are currently enabled.

Committed, thanks.

I've also adjusted CHANGES.

Signature · 1 line
Bye, Peter Korsgaard