diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2018-09-14 18:18:00 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-09-17 08:41:44 +0100 |
commit | c316eb3b8877ceba47fbb0087897a4ea8cca6036 (patch) | |
tree | b77d311d82058f915b35928ff608864de0cda64b /meta/recipes-connectivity/openssl/openssl_1.1.1.bb | |
parent | 4ca9402c37205df4ea70c154f17b01c91a48176a (diff) | |
download | poky-c316eb3b8877ceba47fbb0087897a4ea8cca6036.tar.gz |
openssl: update to 1.1.1 final
This is the new LTS release with support for TLS 1.3.
Release announcement:
https://www.openssl.org/blog/blog/2018/09/11/release111/
(From OE-Core rev: 6b0d5202002f76106ea33e4975c8ebef72a63fa1)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/openssl/openssl_1.1.1.bb')
-rw-r--r-- | meta/recipes-connectivity/openssl/openssl_1.1.1.bb | 182 |
1 files changed, 182 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.1.bb b/meta/recipes-connectivity/openssl/openssl_1.1.1.bb new file mode 100644 index 0000000000..09b2c01024 --- /dev/null +++ b/meta/recipes-connectivity/openssl/openssl_1.1.1.bb | |||
@@ -0,0 +1,182 @@ | |||
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 | SSLeay" dual license | ||
8 | LICENSE = "openssl" | ||
9 | LIC_FILES_CHKSUM = "file://LICENSE;md5=d57d511030c9d66ef5f5966bee5a7eff" | ||
10 | |||
11 | DEPENDS = "hostperl-runtime-native" | ||
12 | |||
13 | SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \ | ||
14 | file://run-ptest \ | ||
15 | file://openssl-c_rehash.sh \ | ||
16 | " | ||
17 | |||
18 | SRC_URI_append_class-nativesdk = " \ | ||
19 | file://environment.d-openssl.sh \ | ||
20 | " | ||
21 | |||
22 | SRC_URI[md5sum] = "7079eb017429e0ffb9efb42bf80ccb21" | ||
23 | SRC_URI[sha256sum] = "2836875a0f89c03d0fdf483941512613a50cfb421d6fd94b9f41d7279d586a3d" | ||
24 | |||
25 | inherit lib_package multilib_header ptest | ||
26 | |||
27 | #| ./libcrypto.so: undefined reference to `getcontext' | ||
28 | #| ./libcrypto.so: undefined reference to `setcontext' | ||
29 | #| ./libcrypto.so: undefined reference to `makecontext' | ||
30 | EXTRA_OECONF_append_libc-musl = " no-async" | ||
31 | |||
32 | # This prevents openssl from using getrandom() which is not available on older glibc versions | ||
33 | # (native versions can be built with newer glibc, but then relocated onto a system with older glibc) | ||
34 | EXTRA_OECONF_class-native = "--with-rand-seed=devrandom" | ||
35 | EXTRA_OECONF_class-nativesdk = "--with-rand-seed=devrandom" | ||
36 | |||
37 | # Relying on hardcoded built-in paths causes openssl-native to not be relocateable from sstate. | ||
38 | CFLAGS_append_class-native = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin" | ||
39 | CFLAGS_append_class-nativesdk = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin" | ||
40 | |||
41 | do_configure () { | ||
42 | os=${HOST_OS} | ||
43 | case $os in | ||
44 | linux-gnueabi |\ | ||
45 | linux-gnuspe |\ | ||
46 | linux-musleabi |\ | ||
47 | linux-muslspe |\ | ||
48 | linux-musl ) | ||
49 | os=linux | ||
50 | ;; | ||
51 | *) | ||
52 | ;; | ||
53 | esac | ||
54 | target="$os-${HOST_ARCH}" | ||
55 | case $target in | ||
56 | linux-arm*) | ||
57 | target=linux-armv4 | ||
58 | ;; | ||
59 | linux-aarch64*) | ||
60 | target=linux-aarch64 | ||
61 | ;; | ||
62 | linux-i?86 | linux-viac3) | ||
63 | target=linux-x86 | ||
64 | ;; | ||
65 | linux-gnux32-x86_64 | linux-muslx32-x86_64 ) | ||
66 | target=linux-x32 | ||
67 | ;; | ||
68 | linux-gnu64-x86_64) | ||
69 | target=linux-x86_64 | ||
70 | ;; | ||
71 | linux-mips | linux-mipsel) | ||
72 | # specifying TARGET_CC_ARCH prevents openssl from (incorrectly) adding target architecture flags | ||
73 | target="linux-mips32 ${TARGET_CC_ARCH}" | ||
74 | ;; | ||
75 | linux-gnun32-mips*) | ||
76 | target=linux-mips64 | ||
77 | ;; | ||
78 | linux-*-mips64 | linux-mips64 | linux-*-mips64el | linux-mips64el) | ||
79 | target=linux64-mips64 | ||
80 | ;; | ||
81 | linux-microblaze* | linux-nios2* | linux-sh3 | linux-sh4) | ||
82 | target=linux-generic32 | ||
83 | ;; | ||
84 | linux-powerpc) | ||
85 | target=linux-ppc | ||
86 | ;; | ||
87 | linux-powerpc64) | ||
88 | target=linux-ppc64 | ||
89 | ;; | ||
90 | linux-riscv32) | ||
91 | target=linux-generic32 | ||
92 | ;; | ||
93 | linux-riscv64) | ||
94 | target=linux-generic64 | ||
95 | ;; | ||
96 | linux-sparc | linux-supersparc) | ||
97 | target=linux-sparcv9 | ||
98 | ;; | ||
99 | esac | ||
100 | |||
101 | useprefix=${prefix} | ||
102 | if [ "x$useprefix" = "x" ]; then | ||
103 | useprefix=/ | ||
104 | fi | ||
105 | # WARNING: do not set compiler/linker flags (-I/-D etc.) in EXTRA_OECONF, as they will fully replace the | ||
106 | # environment variables set by bitbake. Adjust the environment variables instead. | ||
107 | perl ./Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdir} $target | ||
108 | } | ||
109 | |||
110 | do_install () { | ||
111 | oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install | ||
112 | |||
113 | oe_multilib_header openssl/opensslconf.h | ||
114 | |||
115 | # Create SSL structure for packages such as ca-certificates which | ||
116 | # contain hard-coded paths to /etc/ssl. Debian does the same. | ||
117 | install -d ${D}${sysconfdir}/ssl | ||
118 | mv ${D}${libdir}/ssl-1.1/certs \ | ||
119 | ${D}${libdir}/ssl-1.1/private \ | ||
120 | ${D}${libdir}/ssl-1.1/openssl.cnf \ | ||
121 | ${D}${sysconfdir}/ssl/ | ||
122 | |||
123 | # Although absolute symlinks would be OK for the target, they become | ||
124 | # invalid if native or nativesdk are relocated from sstate. | ||
125 | ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/certs')} ${D}${libdir}/ssl-1.1/certs | ||
126 | ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/private')} ${D}${libdir}/ssl-1.1/private | ||
127 | ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/openssl.cnf')} ${D}${libdir}/ssl-1.1/openssl.cnf | ||
128 | } | ||
129 | |||
130 | do_install_append_class-native () { | ||
131 | create_wrapper ${D}${bindir}/openssl \ | ||
132 | OPENSSL_CONF=${libdir}/ssl-1.1/openssl.cnf \ | ||
133 | SSL_CERT_DIR=${libdir}/ssl-1.1/certs \ | ||
134 | SSL_CERT_FILE=${libdir}/ssl-1.1/cert.pem \ | ||
135 | OPENSSL_ENGINES=${libdir}/ssl-1.1/engines | ||
136 | |||
137 | # Install a custom version of c_rehash that can handle sysroots properly. | ||
138 | # This version is used for example when installing ca-certificates during | ||
139 | # image creation. | ||
140 | install -Dm 0755 ${WORKDIR}/openssl-c_rehash.sh ${D}${bindir}/c_rehash | ||
141 | sed -i -e 's,/etc/openssl,${sysconfdir}/ssl,g' ${D}${bindir}/c_rehash | ||
142 | } | ||
143 | |||
144 | do_install_append_class-nativesdk () { | ||
145 | mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d | ||
146 | install -m 644 ${WORKDIR}/environment.d-openssl.sh ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh | ||
147 | sed 's|/usr/lib/ssl/|/usr/lib/ssl-1.1/|g' -i ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh | ||
148 | } | ||
149 | |||
150 | do_install_ptest () { | ||
151 | cp -r * ${D}${PTEST_PATH} | ||
152 | } | ||
153 | |||
154 | PRIVATE_LIBS_${PN}-ptest = "libcrypto.so.1.1 libssl.so.1.1" | ||
155 | |||
156 | # Add the openssl.cnf file to the openssl-conf package. Make the libcrypto | ||
157 | # package RRECOMMENDS on this package. This will enable the configuration | ||
158 | # file to be installed for both the openssl-bin package and the libcrypto | ||
159 | # package since the openssl-bin package depends on the libcrypto package. | ||
160 | |||
161 | PACKAGES =+ "libcrypto libssl openssl-conf ${PN}-engines ${PN}-misc" | ||
162 | |||
163 | FILES_libcrypto = "${libdir}/libcrypto${SOLIBS}" | ||
164 | FILES_libssl = "${libdir}/libssl${SOLIBS}" | ||
165 | FILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf" | ||
166 | FILES_${PN}-engines = "${libdir}/engines-1.1" | ||
167 | FILES_${PN}-misc = "${libdir}/ssl-1.1/misc" | ||
168 | FILES_${PN} =+ "${libdir}/ssl-1.1/*" | ||
169 | FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/openssl.sh" | ||
170 | |||
171 | CONFFILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf" | ||
172 | |||
173 | RRECOMMENDS_libcrypto += "openssl-conf" | ||
174 | RDEPENDS_${PN}-bin = "perl" | ||
175 | RDEPENDS_${PN}-misc = "perl" | ||
176 | RDEPENDS_${PN}-ptest += "perl-module-file-spec-functions bash python" | ||
177 | |||
178 | RPROVIDES_openssl-conf = "openssl10-conf" | ||
179 | RREPLACES_openssl-conf = "openssl10-conf" | ||
180 | RCONFLICTS_openssl-conf = "openssl10-conf" | ||
181 | |||
182 | BBCLASSEXTEND = "native nativesdk" | ||