diff options
author | Adrian Bunk <bunk@stusta.de> | 2020-03-23 15:44:05 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-03-24 16:39:40 +0000 |
commit | 2e77b00ed352950298e356fdeb0cb8cbbefafce0 (patch) | |
tree | c834bda110426f14bb4402c79ee63933e0361965 /meta/recipes-connectivity/openssl/openssl_1.1.1d.bb | |
parent | 19c8e88cb409260fd5cf7e60a6f004389a6dd487 (diff) | |
download | poky-2e77b00ed352950298e356fdeb0cb8cbbefafce0.tar.gz |
openssl: Upgrade 1.1.1d -> 1.1.1e
Backported patch removed.
(From OE-Core rev: 710bc0f8544f54750c8fb7b8affa243932927a24)
Signed-off-by: Adrian Bunk <bunk@stusta.de>
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 4653d8ab9d..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 multilib_script ptest | ||
31 | MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash" | ||
32 | |||
33 | PACKAGECONFIG ?= "" | ||
34 | PACKAGECONFIG_class-native = "" | ||
35 | PACKAGECONFIG_class-nativesdk = "" | ||
36 | |||
37 | PACKAGECONFIG[cryptodev-linux] = "enable-devcryptoeng,disable-devcryptoeng,cryptodev-linux,,cryptodev-module" | ||
38 | |||
39 | B = "${WORKDIR}/build" | ||
40 | do_configure[cleandirs] = "${B}" | ||
41 | |||
42 | #| ./libcrypto.so: undefined reference to `getcontext' | ||
43 | #| ./libcrypto.so: undefined reference to `setcontext' | ||
44 | #| ./libcrypto.so: undefined reference to `makecontext' | ||
45 | EXTRA_OECONF_append_libc-musl = " no-async" | ||
46 | EXTRA_OECONF_append_libc-musl_powerpc64 = " no-asm" | ||
47 | |||
48 | # adding devrandom prevents openssl from using getrandom() which is not available on older glibc versions | ||
49 | # (native versions can be built with newer glibc, but then relocated onto a system with older glibc) | ||
50 | EXTRA_OECONF_class-native = "--with-rand-seed=os,devrandom" | ||
51 | EXTRA_OECONF_class-nativesdk = "--with-rand-seed=os,devrandom" | ||
52 | |||
53 | # Relying on hardcoded built-in paths causes openssl-native to not be relocateable from sstate. | ||
54 | CFLAGS_append_class-native = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin" | ||
55 | CFLAGS_append_class-nativesdk = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin" | ||
56 | |||
57 | do_configure () { | ||
58 | os=${HOST_OS} | ||
59 | case $os in | ||
60 | linux-gnueabi |\ | ||
61 | linux-gnuspe |\ | ||
62 | linux-musleabi |\ | ||
63 | linux-muslspe |\ | ||
64 | linux-musl ) | ||
65 | os=linux | ||
66 | ;; | ||
67 | *) | ||
68 | ;; | ||
69 | esac | ||
70 | target="$os-${HOST_ARCH}" | ||
71 | case $target in | ||
72 | linux-arm*) | ||
73 | target=linux-armv4 | ||
74 | ;; | ||
75 | linux-aarch64*) | ||
76 | target=linux-aarch64 | ||
77 | ;; | ||
78 | linux-i?86 | linux-viac3) | ||
79 | target=linux-x86 | ||
80 | ;; | ||
81 | linux-gnux32-x86_64 | linux-muslx32-x86_64 ) | ||
82 | target=linux-x32 | ||
83 | ;; | ||
84 | linux-gnu64-x86_64) | ||
85 | target=linux-x86_64 | ||
86 | ;; | ||
87 | linux-mips | linux-mipsel) | ||
88 | # specifying TARGET_CC_ARCH prevents openssl from (incorrectly) adding target architecture flags | ||
89 | target="linux-mips32 ${TARGET_CC_ARCH}" | ||
90 | ;; | ||
91 | linux-gnun32-mips*) | ||
92 | target=linux-mips64 | ||
93 | ;; | ||
94 | linux-*-mips64 | linux-mips64 | linux-*-mips64el | linux-mips64el) | ||
95 | target=linux64-mips64 | ||
96 | ;; | ||
97 | linux-microblaze* | linux-nios2* | linux-sh3 | linux-sh4 | linux-arc*) | ||
98 | target=linux-generic32 | ||
99 | ;; | ||
100 | linux-powerpc) | ||
101 | target=linux-ppc | ||
102 | ;; | ||
103 | linux-powerpc64) | ||
104 | target=linux-ppc64 | ||
105 | ;; | ||
106 | linux-powerpc64le) | ||
107 | target=linux-ppc64le | ||
108 | ;; | ||
109 | linux-riscv32) | ||
110 | target=linux-generic32 | ||
111 | ;; | ||
112 | linux-riscv64) | ||
113 | target=linux-generic64 | ||
114 | ;; | ||
115 | linux-sparc | linux-supersparc) | ||
116 | target=linux-sparcv9 | ||
117 | ;; | ||
118 | esac | ||
119 | |||
120 | useprefix=${prefix} | ||
121 | if [ "x$useprefix" = "x" ]; then | ||
122 | useprefix=/ | ||
123 | fi | ||
124 | # WARNING: do not set compiler/linker flags (-I/-D etc.) in EXTRA_OECONF, as they will fully replace the | ||
125 | # environment variables set by bitbake. Adjust the environment variables instead. | ||
126 | HASHBANGPERL="/usr/bin/env perl" PERL=perl PERL5LIB="${S}/external/perl/Text-Template-1.46/lib/" \ | ||
127 | perl ${S}/Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdir} $target | ||
128 | perl ${B}/configdata.pm --dump | ||
129 | } | ||
130 | |||
131 | do_install () { | ||
132 | oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install | ||
133 | |||
134 | oe_multilib_header openssl/opensslconf.h | ||
135 | |||
136 | # Create SSL structure for packages such as ca-certificates which | ||
137 | # contain hard-coded paths to /etc/ssl. Debian does the same. | ||
138 | install -d ${D}${sysconfdir}/ssl | ||
139 | mv ${D}${libdir}/ssl-1.1/certs \ | ||
140 | ${D}${libdir}/ssl-1.1/private \ | ||
141 | ${D}${libdir}/ssl-1.1/openssl.cnf \ | ||
142 | ${D}${sysconfdir}/ssl/ | ||
143 | |||
144 | # Although absolute symlinks would be OK for the target, they become | ||
145 | # invalid if native or nativesdk are relocated from sstate. | ||
146 | ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/certs')} ${D}${libdir}/ssl-1.1/certs | ||
147 | ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/private')} ${D}${libdir}/ssl-1.1/private | ||
148 | ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/openssl.cnf')} ${D}${libdir}/ssl-1.1/openssl.cnf | ||
149 | } | ||
150 | |||
151 | do_install_append_class-native () { | ||
152 | create_wrapper ${D}${bindir}/openssl \ | ||
153 | OPENSSL_CONF=${libdir}/ssl-1.1/openssl.cnf \ | ||
154 | SSL_CERT_DIR=${libdir}/ssl-1.1/certs \ | ||
155 | SSL_CERT_FILE=${libdir}/ssl-1.1/cert.pem \ | ||
156 | OPENSSL_ENGINES=${libdir}/engines-1.1 | ||
157 | } | ||
158 | |||
159 | do_install_append_class-nativesdk () { | ||
160 | mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d | ||
161 | install -m 644 ${WORKDIR}/environment.d-openssl.sh ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh | ||
162 | sed 's|/usr/lib/ssl/|/usr/lib/ssl-1.1/|g' -i ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh | ||
163 | } | ||
164 | |||
165 | PTEST_BUILD_HOST_FILES += "configdata.pm" | ||
166 | PTEST_BUILD_HOST_PATTERN = "perl_version =" | ||
167 | do_install_ptest () { | ||
168 | # Prune the build tree | ||
169 | rm -f ${B}/fuzz/*.* ${B}/test/*.* | ||
170 | |||
171 | cp ${S}/Configure ${B}/configdata.pm ${D}${PTEST_PATH} | ||
172 | cp -r ${S}/external ${B}/test ${S}/test ${B}/fuzz ${S}/util ${B}/util ${D}${PTEST_PATH} | ||
173 | |||
174 | # For test_shlibload | ||
175 | ln -s ${libdir}/libcrypto.so.1.1 ${D}${PTEST_PATH}/ | ||
176 | ln -s ${libdir}/libssl.so.1.1 ${D}${PTEST_PATH}/ | ||
177 | |||
178 | install -d ${D}${PTEST_PATH}/apps | ||
179 | ln -s ${bindir}/openssl ${D}${PTEST_PATH}/apps | ||
180 | install -m644 ${S}/apps/*.pem ${S}/apps/*.srl ${S}/apps/openssl.cnf ${D}${PTEST_PATH}/apps | ||
181 | install -m755 ${B}/apps/CA.pl ${D}${PTEST_PATH}/apps | ||
182 | |||
183 | install -d ${D}${PTEST_PATH}/engines | ||
184 | install -m755 ${B}/engines/ossltest.so ${D}${PTEST_PATH}/engines | ||
185 | } | ||
186 | |||
187 | # Add the openssl.cnf file to the openssl-conf package. Make the libcrypto | ||
188 | # package RRECOMMENDS on this package. This will enable the configuration | ||
189 | # file to be installed for both the openssl-bin package and the libcrypto | ||
190 | # package since the openssl-bin package depends on the libcrypto package. | ||
191 | |||
192 | PACKAGES =+ "libcrypto libssl openssl-conf ${PN}-engines ${PN}-misc" | ||
193 | |||
194 | FILES_libcrypto = "${libdir}/libcrypto${SOLIBS}" | ||
195 | FILES_libssl = "${libdir}/libssl${SOLIBS}" | ||
196 | FILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf" | ||
197 | FILES_${PN}-engines = "${libdir}/engines-1.1" | ||
198 | FILES_${PN}-misc = "${libdir}/ssl-1.1/misc" | ||
199 | FILES_${PN} =+ "${libdir}/ssl-1.1/*" | ||
200 | FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/openssl.sh" | ||
201 | |||
202 | CONFFILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf" | ||
203 | |||
204 | RRECOMMENDS_libcrypto += "openssl-conf" | ||
205 | RDEPENDS_${PN}-ptest += "openssl-bin perl perl-modules bash" | ||
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" | ||