Skip to contentSkip to conversation

ca-certificates: Fix openssl runtime cert dependencies

PATCH In review Khem Raj 4 participants 5 messages Apr 18, 2021 – Apr 26, 2021

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 ca-certificates: Fix openssl runtime cert dependencies

With commit dc778c70449ee5401b5a24ad18b22b88338c47c5, dependency was moved to openssl-bin which in itself was a fine change, but dropping dependency on openssl too should have been kept along, dropping this meant that openssl binary wont be able to validate secure connections as the CApath files wont be installed, which infact are required for openssl bins to work, following call e.g. fails

$ openssl s_client -connect google.com:443

....
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Server public key is 256 bit
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 20 (unable to get local issuer certificate)
....

The local issuer certs are not found in default location /usr/lib/ssh-1.1/certs, this dir and its content is installed by openssl package therefore re-add the dependency on openssl

Cc Andrei Gherzan <[email protected]>
---
 .../ca-certificates/ca-certificates_20210119.bb             | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta/recipes-support/ca-certificates/ca-certificates_20210119.bb +3 -3
index 888a235c1a..7dcc86fdc1 100644
@@ -83,8 +83,8 @@ do_install_append_class-native () {
     SYSROOT="${D}${base_prefix}" ${D}${sbindir}/update-ca-certificates
 }
 
-RDEPENDS_${PN}_class-target = "openssl-bin"
-RDEPENDS_${PN}_class-native = "openssl-native"
-RDEPENDS_${PN}_class-nativesdk = "nativesdk-openssl-bin"
+RDEPENDS_${PN}_append_class-target = " openssl-bin openssl"
+RDEPENDS_${PN}_append_class-native = " openssl-native"
+RDEPENDS_${PN}_append_class-nativesdk = " nativesdk-openssl-bin nativesdk-openssl"
 
 BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.31.1
#1 lore raw

Hi,

Quoted 8 lines · Khem Raj

With commit dc778c70449ee5401b5a24ad18b22b88338c47c5, dependency was moved to openssl-bin which in itself was a fine change, but dropping dependency on openssl too should have been kept along, dropping this meant that openssl binary wont be able to validate secure connections as the CApath files wont be installed, which infact are required for openssl bins to work, following call e.g. fails

$ openssl s_client -connect google.com:443

This sounds a lot like a ptest or selftest? Maybe using some yocto server instead of google though.

Cheers,

-Mikko

Quoted 44 lines

....
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Server public key is 256 bit
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 20 (unable to get local issuer certificate)
....

The local issuer certs are not found in default location /usr/lib/ssh-1.1/certs, this dir and its content is installed by openssl package therefore re-add the dependency on openssl

Cc Andrei Gherzan <[email protected]>
---
 .../ca-certificates/ca-certificates_20210119.bb             | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta/recipes-support/ca-certificates/ca-certificates_20210119.bb +3 -3
index 888a235c1a..7dcc86fdc1 100644
@@ -83,8 +83,8 @@ do_install_append_class-native () {
     SYSROOT="${D}${base_prefix}" ${D}${sbindir}/update-ca-certificates
 }
 
-RDEPENDS_${PN}_class-target = "openssl-bin"
-RDEPENDS_${PN}_class-native = "openssl-native"
-RDEPENDS_${PN}_class-nativesdk = "nativesdk-openssl-bin"
+RDEPENDS_${PN}_append_class-target = " openssl-bin openssl"
+RDEPENDS_${PN}_append_class-native = " openssl-native"
+RDEPENDS_${PN}_append_class-nativesdk = " nativesdk-openssl-bin nativesdk-openssl"
 
 BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.31.1
author
#2 lore raw
Quoted 10 lines · On 4/18/21 11:40 PM, [email protected] wrote:

Hi,

Quoted 7 lines · Khem Raj

With commit dc778c70449ee5401b5a24ad18b22b88338c47c5, dependency was moved to openssl-bin which in itself was a fine change, but dropping dependency on openssl too should have been kept along, dropping this meant that openssl binary wont be able to validate secure connections as the CApath files wont be installed, which infact are required for openssl bins to work, following call e.g. fails

Quoted 4 lines
Quoted 1 line
$ openssl s_client -connect google.com:443

This sounds a lot like a ptest or selftest? Maybe using some yocto server instead of google though.

Yeah certainly a good idea,

Quoted 49 lines

Cheers,

-Mikko

Quoted 44 lines

....
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Server public key is 256 bit
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 20 (unable to get local issuer certificate)
....

The local issuer certs are not found in default location /usr/lib/ssh-1.1/certs, this dir and its content is installed by openssl package therefore re-add the dependency on openssl

Cc Andrei Gherzan <[email protected]>
---
  .../ca-certificates/ca-certificates_20210119.bb             | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
meta/recipes-support/ca-certificates/ca-certificates_20210119.bb +3 -3
index 888a235c1a..7dcc86fdc1 100644
@@ -83,8 +83,8 @@ do_install_append_class-native () {
      SYSROOT="${D}${base_prefix}" ${D}${sbindir}/update-ca-certificates
  }
 
-RDEPENDS_${PN}_class-target = "openssl-bin"
-RDEPENDS_${PN}_class-native = "openssl-native"
-RDEPENDS_${PN}_class-nativesdk = "nativesdk-openssl-bin"
+RDEPENDS_${PN}_append_class-target = " openssl-bin openssl"
+RDEPENDS_${PN}_append_class-native = " openssl-native"
+RDEPENDS_${PN}_append_class-nativesdk = " nativesdk-openssl-bin nativesdk-openssl"
 
  BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.31.1
#3 lore raw
In reply to Khem Raj
Quoted 20 lines · Khem Raj

With commit dc778c70449ee5401b5a24ad18b22b88338c47c5, dependency was moved to openssl-bin which in itself was a fine change, but dropping dependency on openssl too should have been kept along, dropping this meant that openssl binary wont be able to validate secure connections as the CApath files wont be installed, which infact are required for openssl bins to work, following call e.g. fails

$ openssl s_client -connect google.com:443

....
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Server public key is 256 bit
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 20 (unable to get local issuer certificate)
....

Quoted 3 lines

The local issuer certs are not found in default location /usr/lib/ssh-1.1/certs, this dir and its content is installed by openssl package therefore re-add the dependency on openssl

Good idea for a ptest. Change looks good to me.

--
Andrei

#4 lore raw
Quoted 21 lines · Andrei Gherzan
Quoted 20 lines · Khem Raj

With commit dc778c70449ee5401b5a24ad18b22b88338c47c5, dependency was moved to openssl-bin which in itself was a fine change, but dropping dependency on openssl too should have been kept along, dropping this meant that openssl binary wont be able to validate secure connections as the CApath files wont be installed, which infact are required for openssl bins to work, following call e.g. fails

$ openssl s_client -connect google.com:443

....
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Server public key is 256 bit
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 20 (unable to get local issuer certificate)
....

Quoted 5 lines
Quoted 3 lines

The local issuer certs are not found in default location /usr/lib/ssh-1.1/certs, this dir and its content is installed by openssl package therefore re-add the dependency on openssl

Good idea for a ptest. Change looks good to me.

Might be worth a bug opening so we don't forget?

Cheers,

Richard