]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
openssl: export necessary env vars in SDK
authorChen Qi <Qi.Chen@windriver.com>
Wed, 19 Oct 2022 09:32:28 +0000 (02:32 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 25 Oct 2022 12:42:00 +0000 (13:42 +0100)
In current SDK, when running the following command in python
shell, we get an error.

$ python3
>>> 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.

Also, there are other env vars that need to be exported. And we export
all of them to keep sync with openssl-native.bbclass.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-connectivity/openssl/files/environment.d-openssl.sh

index b9cc24a7acf75c44521f1f0e77c1cae7502328f4..516bbd1c560fa92c312fbdf4714c069cbe0e761a 100644 (file)
@@ -1 +1,5 @@
 export OPENSSL_CONF="$OECORE_NATIVE_SYSROOT/usr/lib/ssl/openssl.cnf"
+export SSL_CERT_DIR="$OECORE_NATIVE_SYSROOT/usr/lib/ssl/certs"
+export SSL_CERT_FILE="$OECORE_NATIVE_SYSROOT/usr/lib/ssl/cert.pem"
+export OPENSSL_MODULES="$OECORE_NATIVE_SYSROOT/usr/lib/ossl-modules/"
+export OPENSSL_ENGINES="$OECORE_NATIVE_SYSROOT/usr/lib/engines-3"