diff options
author | Adrian Bunk <bunk@stusta.de> | 2020-03-23 15:44:05 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-05-22 16:23:30 +0100 |
commit | 0c6a8b5ef3efc0f756e76ee4cceaa60ba9ff6ac6 (patch) | |
tree | 77a2acdb1e56cbbc9c4b68ae232fbf90127fc3ca /meta/recipes-connectivity/openssl/openssl_1.1.1d.bb | |
parent | d40a1892a9842661779a1b5eb5e435e2c90df60d (diff) | |
download | poky-0c6a8b5ef3efc0f756e76ee4cceaa60ba9ff6ac6.tar.gz |
openssl: Upgrade 1.1.1d -> 1.1.1e
Backported patch removed.
(From OE-Core rev: 4dc340d63d29e632c8402342cf4b66a41c9c5f93)
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 710bc0f8544f54750c8fb7b8affa243932927a24)
[AK: bug fix only update]
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/openssl/openssl_1.1.1d.bb')
-rw-r--r-- | meta/recipes-connectivity/openssl/openssl_1.1.1d.bb | 213 |
1 files changed, 0 insertions, 213 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.1d.bb b/meta/recipes-connectivity/openssl/openssl_1.1.1d.bb deleted file mode 100644 index d656cb3cfa..0000000000 --- a/meta/recipes-connectivity/openssl/openssl_1.1.1d.bb +++ /dev/null | |||
@@ -1,213 +0,0 @@ | |||
1 | SUMMARY = "Secure Socket Layer" | ||
2 | DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools." | ||
3 | HOMEPAGE = "http://www.openssl.org/" | ||
4 | BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html" | ||
5 | SECTION = "libs/network" | ||
6 | |||
7 | # "openssl" here actually means both OpenSSL and SSLeay licenses apply | ||
8 | # (see meta/files/common-licenses/OpenSSL to which "openssl" is SPDXLICENSEMAPped) | ||
9 | LICENSE = "openssl" | ||
10 | LIC_FILES_CHKSUM = "file://LICENSE;md5=d343e62fc9c833710bbbed25f27364c8" | ||
11 | |||
12 | DEPENDS = "hostperl-runtime-native" | ||
13 | |||
14 | SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \ | ||
15 | file://run-ptest \ | ||
16 | file://0001-skip-test_symbol_presence.patch \ | ||
17 | file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \ | ||
18 | file://afalg.patch \ | ||
19 | file://CVE-2019-1551.patch \ | ||
20 | file://reproducible.patch \ | ||
21 | " | ||
22 | |||
23 | SRC_URI_append_class-nativesdk = " \ | ||
24 | file://environment.d-openssl.sh \ | ||
25 | " | ||
26 | |||
27 | SRC_URI[md5sum] = "3be209000dbc7e1b95bcdf47980a3baa" | ||
28 | SRC_URI[sha256sum] = "1e3a91bc1f9dfce01af26026f856e064eab4c8ee0a8f457b5ae30b40b8b711f2" | ||
29 | |||
30 | inherit lib_package multilib_header ptest | ||
31 | |||
32 | PACKAGECONFIG ?= "" | ||
33 | PACKAGECONFIG_class-native = "" | ||
34 | PACKAGECONFIG_class-nativesdk = "" | ||
35 | |||
36 | PACKAGECONFIG[cryptodev-linux] = "enable-devcryptoeng,disable-devcryptoeng,cryptodev-linux,,cryptodev-module" | ||
37 | |||
38 | B = "${WORKDIR}/build" | ||
39 | do_configure[cleandirs] = "${B}" | ||
40 | |||
41 | #| ./libcrypto.so: undefined reference to `getcontext' | ||
42 | #| ./libcrypto.so: undefined reference to `setcontext' | ||
43 | #| ./libcrypto.so: undefined reference to `makecontext' | ||
44 | EXTRA_OECONF_append_libc-musl = " no-async" | ||
45 | EXTRA_OECONF_append_libc-musl_powerpc64 = " no-asm" | ||
46 | |||
47 | # adding devrandom prevents openssl from using getrandom() which is not available on older glibc versions | ||
48 | # (native versions can be built with newer glibc, but then relocated onto a system with older glibc) | ||
49 | EXTRA_OECONF_class-native = "--with-rand-seed=os,devrandom" | ||
50 | EXTRA_OECONF_class-nativesdk = "--with-rand-seed=os,devrandom" | ||
51 | |||
52 | # Relying on hardcoded built-in paths causes openssl-native to not be relocateable from sstate. | ||
53 | CFLAGS_append_class-native = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin" | ||
54 | CFLAGS_append_class-nativesdk = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin" | ||
55 | |||
56 | do_configure () { | ||
57 | os=${HOST_OS} | ||
58 | case $os in | ||
59 | linux-gnueabi |\ | ||
60 | linux-gnuspe |\ | ||
61 | linux-musleabi |\ | ||
62 | linux-muslspe |\ | ||
63 | linux-musl ) | ||
64 | os=linux | ||
65 | ;; | ||
66 | *) | ||
67 | ;; | ||
68 | esac | ||
69 | target="$os-${HOST_ARCH}" | ||
70 | case $target in | ||
71 | linux-arm*) | ||
72 | target=linux-armv4 | ||
73 | ;; | ||
74 | linux-aarch64*) | ||
75 | target=linux-aarch64 | ||
76 | ;; | ||
77 | linux-i?86 | linux-viac3) | ||
78 | target=linux-x86 | ||
79 | ;; | ||
80 | linux-gnux32-x86_64 | linux-muslx32-x86_64 ) | ||
81 | target=linux-x32 | ||
82 | ;; | ||
83 | linux-gnu64-x86_64) | ||
84 | target=linux-x86_64 | ||
85 | ;; | ||
86 | linux-mips | linux-mipsel) | ||
87 | # specifying TARGET_CC_ARCH prevents openssl from (incorrectly) adding target architecture flags | ||
88 | target="linux-mips32 ${TARGET_CC_ARCH}" | ||
89 | ;; | ||
90 | linux-gnun32-mips*) | ||
91 | target=linux-mips64 | ||
92 | ;; | ||
93 | linux-*-mips64 | linux-mips64 | linux-*-mips64el | linux-mips64el) | ||
94 | target=linux64-mips64 | ||
95 | ;; | ||
96 | linux-microblaze* | linux-nios2* | linux-sh3 | linux-sh4 | linux-arc*) | ||
97 | target=linux-generic32 | ||
98 | ;; | ||
99 | linux-powerpc) | ||
100 | target=linux-ppc | ||
101 | ;; | ||
102 | linux-powerpc64) | ||
103 | target=linux-ppc64 | ||
104 | ;; | ||
105 | linux-riscv32) | ||
106 | target=linux-generic32 | ||
107 | ;; | ||
108 | linux-riscv64) | ||
109 | target=linux-generic64 | ||
110 | ;; | ||
111 | linux-sparc | linux-supersparc) | ||
112 | target=linux-sparcv9 | ||
113 | ;; | ||
114 | esac | ||
115 | |||
116 | useprefix=${prefix} | ||
117 | if [ "x$useprefix" = "x" ]; then | ||
118 | useprefix=/ | ||
119 | fi | ||
120 | # WARNING: do not set compiler/linker flags (-I/-D etc.) in EXTRA_OECONF, as they will fully replace the | ||
121 | # environment variables set by bitbake. Adjust the environment variables instead. | ||
122 | PERL5LIB="${S}/external/perl/Text-Template-1.46/lib/" \ | ||
123 | perl ${S}/Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdir} $target | ||
124 | perl ${B}/configdata.pm --dump | ||
125 | } | ||
126 | |||
127 | do_install () { | ||
128 | oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install | ||
129 | |||
130 | oe_multilib_header openssl/opensslconf.h | ||
131 | |||
132 | # Create SSL structure for packages such as ca-certificates which | ||
133 | # contain hard-coded paths to /etc/ssl. Debian does the same. | ||
134 | install -d ${D}${sysconfdir}/ssl | ||
135 | mv ${D}${libdir}/ssl-1.1/certs \ | ||
136 | ${D}${libdir}/ssl-1.1/private \ | ||
137 | ${D}${libdir}/ssl-1.1/openssl.cnf \ | ||
138 | ${D}${sysconfdir}/ssl/ | ||
139 | |||
140 | # Although absolute symlinks would be OK for the target, they become | ||
141 | # invalid if native or nativesdk are relocated from sstate. | ||
142 | ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/certs')} ${D}${libdir}/ssl-1.1/certs | ||
143 | ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/private')} ${D}${libdir}/ssl-1.1/private | ||
144 | ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/openssl.cnf')} ${D}${libdir}/ssl-1.1/openssl.cnf | ||
145 | } | ||
146 | |||
147 | do_install_append_class-native () { | ||
148 | create_wrapper ${D}${bindir}/openssl \ | ||
149 | OPENSSL_CONF=${libdir}/ssl-1.1/openssl.cnf \ | ||
150 | SSL_CERT_DIR=${libdir}/ssl-1.1/certs \ | ||
151 | SSL_CERT_FILE=${libdir}/ssl-1.1/cert.pem \ | ||
152 | OPENSSL_ENGINES=${libdir}/engines-1.1 | ||
153 | } | ||
154 | |||
155 | do_install_append_class-nativesdk () { | ||
156 | mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d | ||
157 | install -m 644 ${WORKDIR}/environment.d-openssl.sh ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh | ||
158 | sed 's|/usr/lib/ssl/|/usr/lib/ssl-1.1/|g' -i ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh | ||
159 | } | ||
160 | |||
161 | PTEST_BUILD_HOST_FILES += "configdata.pm" | ||
162 | PTEST_BUILD_HOST_PATTERN = "perl_version =" | ||
163 | do_install_ptest () { | ||
164 | # Prune the build tree | ||
165 | rm -f ${B}/fuzz/*.* ${B}/test/*.* | ||
166 | |||
167 | cp ${S}/Configure ${B}/configdata.pm ${D}${PTEST_PATH} | ||
168 | cp -r ${S}/external ${B}/test ${S}/test ${B}/fuzz ${S}/util ${B}/util ${D}${PTEST_PATH} | ||
169 | |||
170 | # For test_shlibload | ||
171 | ln -s ${libdir}/libcrypto.so.1.1 ${D}${PTEST_PATH}/ | ||
172 | ln -s ${libdir}/libssl.so.1.1 ${D}${PTEST_PATH}/ | ||
173 | |||
174 | install -d ${D}${PTEST_PATH}/apps | ||
175 | ln -s ${bindir}/openssl ${D}${PTEST_PATH}/apps | ||
176 | install -m644 ${S}/apps/*.pem ${S}/apps/*.srl ${S}/apps/openssl.cnf ${D}${PTEST_PATH}/apps | ||
177 | install -m755 ${B}/apps/CA.pl ${D}${PTEST_PATH}/apps | ||
178 | |||
179 | install -d ${D}${PTEST_PATH}/engines | ||
180 | install -m755 ${B}/engines/ossltest.so ${D}${PTEST_PATH}/engines | ||
181 | } | ||
182 | |||
183 | # Add the openssl.cnf file to the openssl-conf package. Make the libcrypto | ||
184 | # package RRECOMMENDS on this package. This will enable the configuration | ||
185 | # file to be installed for both the openssl-bin package and the libcrypto | ||
186 | # package since the openssl-bin package depends on the libcrypto package. | ||
187 | |||
188 | PACKAGES =+ "libcrypto libssl openssl-conf ${PN}-engines ${PN}-misc" | ||
189 | |||
190 | FILES_libcrypto = "${libdir}/libcrypto${SOLIBS}" | ||
191 | FILES_libssl = "${libdir}/libssl${SOLIBS}" | ||
192 | FILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf" | ||
193 | FILES_${PN}-engines = "${libdir}/engines-1.1" | ||
194 | FILES_${PN}-misc = "${libdir}/ssl-1.1/misc" | ||
195 | FILES_${PN} =+ "${libdir}/ssl-1.1/*" | ||
196 | FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/openssl.sh" | ||
197 | |||
198 | CONFFILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf" | ||
199 | |||
200 | RRECOMMENDS_libcrypto += "openssl-conf" | ||
201 | RDEPENDS_${PN}-ptest += "openssl-bin perl perl-modules bash" | ||
202 | |||
203 | RPROVIDES_openssl-conf = "openssl10-conf" | ||
204 | RREPLACES_openssl-conf = "openssl10-conf" | ||
205 | RCONFLICTS_openssl-conf = "openssl10-conf" | ||
206 | |||
207 | BBCLASSEXTEND = "native nativesdk" | ||
208 | |||
209 | CVE_PRODUCT = "openssl:openssl" | ||
210 | |||
211 | # Only affects OpenSSL >= 1.1.1 in combination with Apache < 2.4.37 | ||
212 | # Apache in meta-webserver is already recent enough | ||
213 | CVE_CHECK_WHITELIST += "CVE-2019-0190" | ||