summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/openssl
diff options
context:
space:
mode:
authorOvidiu Panait <ovidiu.panait@windriver.com>2017-12-20 13:15:37 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-29 15:23:50 +0100
commitda46b29ffd3bed41030ef3a664e47a30f6ee28f7 (patch)
tree7bcc0a8c1ab27989947ce36a0591e9e4f1e2f673 /meta/recipes-connectivity/openssl
parent8a424659048f26f428dcf043c095d24b0796f1c7 (diff)
downloadpoky-da46b29ffd3bed41030ef3a664e47a30f6ee28f7.tar.gz
openssl-nativesdk: Fix "can't open config file" warning
When SDK is not installed in the default location, openssl will not be able to find the the openssl.cnf config file: "WARNING: can't open config file: XXXX/usr/lib/ssl/openssl.cnf" To fix this, we need to provide the environment variable $OPENSSL_CONF pointing to the correct config file location. (From OE-Core rev: b3f148333515efdb746b78c57d62cfbf3321b21e) (From OE-Core rev: fcea508efedeb36ca31fe8ad0cbc6d194fcfd1f7) Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/openssl')
-rw-r--r--meta/recipes-connectivity/openssl/openssl/environment.d-openssl.sh1
-rw-r--r--meta/recipes-connectivity/openssl/openssl10.inc7
-rw-r--r--meta/recipes-connectivity/openssl/openssl_1.0.2o.bb5
-rw-r--r--meta/recipes-connectivity/openssl/openssl_1.1.0h.bb11
4 files changed, 24 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl/environment.d-openssl.sh b/meta/recipes-connectivity/openssl/openssl/environment.d-openssl.sh
new file mode 100644
index 0000000000..b9cc24a7ac
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl/environment.d-openssl.sh
@@ -0,0 +1 @@
export OPENSSL_CONF="$OECORE_NATIVE_SYSROOT/usr/lib/ssl/openssl.cnf"
diff --git a/meta/recipes-connectivity/openssl/openssl10.inc b/meta/recipes-connectivity/openssl/openssl10.inc
index 995177d320..1f8834f2e8 100644
--- a/meta/recipes-connectivity/openssl/openssl10.inc
+++ b/meta/recipes-connectivity/openssl/openssl10.inc
@@ -285,5 +285,12 @@ do_install_append_class-native() {
285 OPENSSL_ENGINES=${libdir}/ssl/engines 285 OPENSSL_ENGINES=${libdir}/ssl/engines
286} 286}
287 287
288do_install_append_class-nativesdk() {
289 mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d
290 install -m 644 ${WORKDIR}/environment.d-openssl.sh ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh
291}
292
293FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/openssl.sh"
294
288BBCLASSEXTEND = "native nativesdk" 295BBCLASSEXTEND = "native nativesdk"
289 296
diff --git a/meta/recipes-connectivity/openssl/openssl_1.0.2o.bb b/meta/recipes-connectivity/openssl/openssl_1.0.2o.bb
index 413ebf37f4..7cae553f35 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.0.2o.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.0.2o.bb
@@ -47,6 +47,11 @@ SRC_URI_append_class-target = "\
47 file://reproducible-cflags.patch \ 47 file://reproducible-cflags.patch \
48 file://reproducible-mkbuildinf.patch \ 48 file://reproducible-mkbuildinf.patch \
49 " 49 "
50
51SRC_URI_append_class-nativesdk = " \
52 file://environment.d-openssl.sh \
53 "
54
50SRC_URI[md5sum] = "44279b8557c3247cbe324e2322ecd114" 55SRC_URI[md5sum] = "44279b8557c3247cbe324e2322ecd114"
51SRC_URI[sha256sum] = "ec3f5c9714ba0fd45cb4e087301eb1336c317e0d20b575a125050470e8089e4d" 56SRC_URI[sha256sum] = "ec3f5c9714ba0fd45cb4e087301eb1336c317e0d20b575a125050470e8089e4d"
52 57
diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.0h.bb b/meta/recipes-connectivity/openssl/openssl_1.1.0h.bb
index 94b75eb92a..29f83a31a2 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.1.0h.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.1.0h.bb
@@ -19,6 +19,10 @@ SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
19 file://0001-Take-linking-flags-from-LDFLAGS-env-var.patch \ 19 file://0001-Take-linking-flags-from-LDFLAGS-env-var.patch \
20 " 20 "
21 21
22SRC_URI_append_class-nativesdk = " \
23 file://environment.d-openssl.sh \
24 "
25
22S = "${WORKDIR}/openssl-${PV}" 26S = "${WORKDIR}/openssl-${PV}"
23 27
24inherit lib_package multilib_header ptest 28inherit lib_package multilib_header ptest
@@ -142,6 +146,13 @@ do_install_append_class-native () {
142 sed -i -e 's,/etc/openssl,${sysconfdir}/ssl,g' ${D}${bindir}/c_rehash 146 sed -i -e 's,/etc/openssl,${sysconfdir}/ssl,g' ${D}${bindir}/c_rehash
143} 147}
144 148
149do_install_append_class-nativesdk() {
150 mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d
151 install -m 644 ${WORKDIR}/environment.d-openssl.sh ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh
152}
153
154FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/openssl.sh"
155
145do_install_ptest() { 156do_install_ptest() {
146 cp -r * ${D}${PTEST_PATH} 157 cp -r * ${D}${PTEST_PATH}
147 158