openssl: export OPENSSL_MODULES in SDK
PATCH 1/1 openssl: export OPENSSL_MODULES in SDK
In current SDK, when running the following command in python shell, we get an error.
$ python3
Quoted 1 line
Quoted 1 line
Quoted 1 line
from cryptography.hazmat.backends import openssl
The error message is as below:
cryptography.exceptions.InternalError: Unknown OpenSSL error.
We could set OPENSSL_MODULES explicitly in nativesdk-openssl package so that when SDK is set up, it's in environment and we can get rid of the above error.
--- meta/recipes-connectivity/openssl/files/environment.d-openssl.sh | 1 + 1 file changed, 1 insertion(+)
meta/recipes-connectivity/openssl/files/environment.d-openssl.sh +1 -0
@@ -1 +1,2 @@ export OPENSSL_CONF="$OECORE_NATIVE_SYSROOT/usr/lib/ssl/openssl.cnf" +export OPENSSL_MODULES="$OECORE_NATIVE_SYSROOT/usr/lib/ossl-modules/"
Signature · 1 line
2.37.1
Hi,
Quoted 25 lines · Chen Qi
In current SDK, when running the following command in python shell, we get an error.
$ python3Quoted 1 line
Quoted 1 line
Quoted 1 line
from cryptography.hazmat.backends import openssl
The error message is as below:
cryptography.exceptions.InternalError: Unknown OpenSSL error.
We could set
OPENSSL_MODULESexplicitly in nativesdk-openssl package so that when SDK is set up, it's in environment and we can get rid of the above error.Signed-off-by Chen Qi <[email protected]>--- meta/recipes-connectivity/openssl/files/environment.d-openssl.sh | 1 + 1 file changed, 1 insertion(+)meta/recipes-connectivity/openssl/files/environment.d-openssl.sh +0
-0
meta/recipes-connectivity/openssl/files/environment.d-openssl.sh line 2
Quoted 2 lines
meta/recipes-connectivity/openssl/files/environment.d-openssl.sh +1
-0@@ -1 +1,2 @@ export OPENSSL_CONF="$OECORE_NATIVE_SYSROOT/usr/lib/ssl/openssl.cnf" +export OPENSSL_MODULES="$OECORE_NATIVE_SYSROOT/usr/lib/ossl-modules/"
Also needs SSL_CERT_DIR, SSL_CERT_FILE and OPENSSL_ENGINES variables to be set.
Sadly all these are needed for openssl to work correctly.
Cheers,
-Mikko