summaryrefslogtreecommitdiffstats
path: root/recipes-connectivity/openssl/openssl-qoriq_1.1.1d.bb
diff options
context:
space:
mode:
authorChunrong Guo <chunrong.guo@nxp.com>2019-10-15 14:53:45 +0800
committerOtavio Salvador <otavio@ossystems.com.br>2019-10-21 09:07:06 -0300
commit5acc00bf16900b59a49f8804bda5a5ce507d1917 (patch)
tree8ff93bfb7597ce4b5d90a66bb8e79e078ff82add /recipes-connectivity/openssl/openssl-qoriq_1.1.1d.bb
parentb52c7a789b9a5ff7f8fe382ba8c93f9bb12a491c (diff)
downloadmeta-freescale-5acc00bf16900b59a49f8804bda5a5ce507d1917.tar.gz
openssl-qoriq: Upgrade 1.1.0g -> 1.1.1d
*update to lsdk 1909 tag include the following changes: 894da2f - Prepare for 1.1.1d release 1cb7eff - Update copyright year a95b081 - Remove duplicate CHANGES entry 08229ad - Fix a padding oracle in PKCS7_dataDecode and CMS_decrypt_set1_pkey 7ff84d8 - Update CHANGES and NEWS for the new release 79f5e2f - Fix a potential crash in rand_unix.c 1d36536 - Fix a strict warnings error in rand_pool_acquire_entropy 6318018 - drbg: fix issue where DRBG_CTR fails if NO_DF is used (2nd attempt) 5520695 - drbg: add fork id to additional data on UNIX systems 1b0fe00 - drbg: ensure fork-safety without using a pthread_atfork handler 73a683b - [test] ECC: check the bounds for auto computing cofactor 827eab4 - Fix build with VS2008 4bf9781 - Use BN_clear_free in DH_set0_key 8003138 - DH_check_pub_key_ex was accidentally calling DH_check, so results were undefined. 1f9dc86 - Change DH_generate_parameters back to order 2q subgroup 288241b - Fix spacing nit in test/ectest.c 9a43a73 - [ec] Match built-in curves on EC_GROUP_new_from_ecparameters ad9c296 - Configure: clang: move -Wno-unknown-warning-option to the front 9580391 - Append CVE-2019-1547 to related CHANGES entry 87bea65 - Remove x86/x86_64 BSAES and AES_ASM support a6186f3 - CHANGES entry: for ECC parameters with NULL or zero cofactor, compute it eb1ec38 - [test] computing ECC cofactors: regression test 30c22fa - [crypto/ec] for ECC parameters with NULL or zero cofactor, compute it ed0ac11 - [ec/ecp_nistp*.c] restyle: use {} around `else` too Signed-off-by: Chunrong Guo <chunrong.guo@nxp.com>
Diffstat (limited to 'recipes-connectivity/openssl/openssl-qoriq_1.1.1d.bb')
-rw-r--r--recipes-connectivity/openssl/openssl-qoriq_1.1.1d.bb217
1 files changed, 217 insertions, 0 deletions
diff --git a/recipes-connectivity/openssl/openssl-qoriq_1.1.1d.bb b/recipes-connectivity/openssl/openssl-qoriq_1.1.1d.bb
new file mode 100644
index 00000000..13d9fe75
--- /dev/null
+++ b/recipes-connectivity/openssl/openssl-qoriq_1.1.1d.bb
@@ -0,0 +1,217 @@
1SUMMARY = "Secure Socket Layer"
2DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools."
3HOMEPAGE = "http://www.openssl.org/"
4BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html"
5SECTION = "libs/network"
6
7DISABLE_STATIC = ""
8
9# "openssl" here actually means both OpenSSL and SSLeay licenses apply
10# (see meta/files/common-licenses/OpenSSL to which "openssl" is SPDXLICENSEMAPped)
11LICENSE = "openssl"
12LIC_FILES_CHKSUM = "file://LICENSE;md5=d343e62fc9c833710bbbed25f27364c8"
13
14DEPENDS = "hostperl-runtime-native"
15
16SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/openssl;nobranch=1 \
17 file://run-ptest \
18 file://0001-skip-test_symbol_presence.patch \
19 file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \
20 file://afalg.patch \
21 "
22
23SRCREV = "894da2fb7ed5d314ee5c2fc9fd2d9b8b74111596"
24
25SRC_URI_append_class-nativesdk = " \
26 file://environment.d-openssl.sh \
27 "
28inherit lib_package multilib_header multilib_script ptest
29MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash"
30
31PROVIDES = "openssl"
32
33python() {
34 pkgs = d.getVar('PACKAGES').split()
35 for p in pkgs:
36 if 'openssl-qoriq' in p:
37 d.appendVar("RPROVIDES_%s" % p, p.replace('openssl-qoriq', 'openssl'))
38 d.appendVar("RCONFLICTS_%s" % p, p.replace('openssl-qoriq', 'openssl'))
39 d.appendVar("RREPLACES_%s" % p, p.replace('openssl-qoriq', 'openssl'))
40}
41
42PACKAGECONFIG ?= ""
43PACKAGECONFIG_class-native = ""
44PACKAGECONFIG_class-nativesdk = ""
45
46PACKAGECONFIG[cryptodev-linux] = "enable-devcryptoeng,disable-devcryptoeng,cryptodev-linux"
47
48B = "${WORKDIR}/build"
49do_configure[cleandirs] = "${B}"
50
51S = "${WORKDIR}/git"
52
53#| ./libcrypto.so: undefined reference to `getcontext'
54#| ./libcrypto.so: undefined reference to `setcontext'
55#| ./libcrypto.so: undefined reference to `makecontext'
56EXTRA_OECONF_append_libc-musl = " no-async"
57EXTRA_OECONF_append_libc-musl_powerpc64 = " no-asm"
58
59# adding devrandom prevents openssl from using getrandom() which is not available on older glibc versions
60# (native versions can be built with newer glibc, but then relocated onto a system with older glibc)
61EXTRA_OECONF_class-native = "--with-rand-seed=os,devrandom"
62EXTRA_OECONF_class-nativesdk = "--with-rand-seed=os,devrandom"
63
64# Relying on hardcoded built-in paths causes openssl-native to not be relocateable from sstate.
65CFLAGS_append_class-native = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin"
66CFLAGS_append_class-nativesdk = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin"
67
68do_configure () {
69 os=${HOST_OS}
70 case $os in
71 linux-gnueabi |\
72 linux-gnuspe |\
73 linux-musleabi |\
74 linux-muslspe |\
75 linux-musl )
76 os=linux
77 ;;
78 *)
79 ;;
80 esac
81 target="$os-${HOST_ARCH}"
82 case $target in
83 linux-arm*)
84 target=linux-armv4
85 ;;
86 linux-aarch64*)
87 target=linux-aarch64
88 ;;
89 linux-i?86 | linux-viac3)
90 target=linux-x86
91 ;;
92 linux-gnux32-x86_64 | linux-muslx32-x86_64 )
93 target=linux-x32
94 ;;
95 linux-gnu64-x86_64)
96 target=linux-x86_64
97 ;;
98 linux-mips | linux-mipsel)
99 # specifying TARGET_CC_ARCH prevents openssl from (incorrectly) adding target architecture flags
100 target="linux-mips32 ${TARGET_CC_ARCH}"
101 ;;
102 linux-gnun32-mips*)
103 target=linux-mips64
104 ;;
105 linux-*-mips64 | linux-mips64 | linux-*-mips64el | linux-mips64el)
106 target=linux64-mips64
107 ;;
108 linux-microblaze* | linux-nios2* | linux-sh3 | linux-sh4 | linux-arc*)
109 target=linux-generic32
110 ;;
111 linux-powerpc)
112 target=linux-ppc
113 ;;
114 linux-powerpc64)
115 target=linux-ppc64
116 ;;
117 linux-riscv32)
118 target=linux-generic32
119 ;;
120 linux-riscv64)
121 target=linux-generic64
122 ;;
123 linux-sparc | linux-supersparc)
124 target=linux-sparcv9
125 ;;
126 esac
127
128 useprefix=${prefix}
129 if [ "x$useprefix" = "x" ]; then
130 useprefix=/
131 fi
132 # WARNING: do not set compiler/linker flags (-I/-D etc.) in EXTRA_OECONF, as they will fully replace the
133 # environment variables set by bitbake. Adjust the environment variables instead.
134 PERL5LIB="${S}/external/perl/Text-Template-1.46/lib/" \
135 perl ${S}/Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdir} $target
136 perl ${B}/configdata.pm --dump
137}
138
139do_install () {
140 oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install
141
142 oe_multilib_header openssl/opensslconf.h
143
144 # Create SSL structure for packages such as ca-certificates which
145 # contain hard-coded paths to /etc/ssl. Debian does the same.
146 install -d ${D}${sysconfdir}/ssl
147 mv ${D}${libdir}/ssl-1.1/certs \
148 ${D}${libdir}/ssl-1.1/private \
149 ${D}${libdir}/ssl-1.1/openssl.cnf \
150 ${D}${sysconfdir}/ssl/
151
152 # Although absolute symlinks would be OK for the target, they become
153 # invalid if native or nativesdk are relocated from sstate.
154 ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/certs')} ${D}${libdir}/ssl-1.1/certs
155 ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/private')} ${D}${libdir}/ssl-1.1/private
156 ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/openssl.cnf')} ${D}${libdir}/ssl-1.1/openssl.cnf
157}
158
159do_install_append_class-native () {
160 create_wrapper ${D}${bindir}/openssl \
161 OPENSSL_CONF=${libdir}/ssl-1.1/openssl.cnf \
162 SSL_CERT_DIR=${libdir}/ssl-1.1/certs \
163 SSL_CERT_FILE=${libdir}/ssl-1.1/cert.pem \
164 OPENSSL_ENGINES=${libdir}/ssl-1.1/engines
165}
166
167do_install_append_class-nativesdk () {
168 mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d
169 install -m 644 ${WORKDIR}/environment.d-openssl.sh ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh
170 sed 's|/usr/lib/ssl/|/usr/lib/ssl-1.1/|g' -i ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh
171}
172
173PTEST_BUILD_HOST_FILES += "configdata.pm"
174PTEST_BUILD_HOST_PATTERN = "perl_version ="
175do_install_ptest () {
176 # Prune the build tree
177 rm -f ${B}/fuzz/*.* ${B}/test/*.*
178
179 cp ${S}/Configure ${B}/configdata.pm ${D}${PTEST_PATH}
180 cp -r ${S}/external ${B}/test ${S}/test ${B}/fuzz ${S}/util ${B}/util ${D}${PTEST_PATH}
181
182 # For test_shlibload
183 ln -s ${libdir}/libcrypto.so.1.1 ${D}${PTEST_PATH}/
184 ln -s ${libdir}/libssl.so.1.1 ${D}${PTEST_PATH}/
185
186 install -d ${D}${PTEST_PATH}/apps
187 ln -s ${bindir}/openssl ${D}${PTEST_PATH}/apps
188 install -m644 ${S}/apps/*.pem ${S}/apps/*.srl ${S}/apps/openssl.cnf ${D}${PTEST_PATH}/apps
189 install -m755 ${B}/apps/CA.pl ${D}${PTEST_PATH}/apps
190
191 install -d ${D}${PTEST_PATH}/engines
192 install -m755 ${B}/engines/ossltest.so ${D}${PTEST_PATH}/engines
193}
194
195# Add the openssl.cnf file to the openssl-conf package. Make the libcrypto
196# package RRECOMMENDS on this package. This will enable the configuration
197# file to be installed for both the openssl-bin package and the libcrypto
198# package since the openssl-bin package depends on the libcrypto package.
199
200PACKAGES =+ "libcrypto libssl openssl-conf ${PN}-engines ${PN}-misc"
201
202FILES_libcrypto = "${libdir}/libcrypto${SOLIBS}"
203FILES_libssl = "${libdir}/libssl${SOLIBS}"
204FILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf"
205FILES_${PN}-engines = "${libdir}/engines-1.1"
206FILES_${PN}-misc = "${libdir}/ssl-1.1/misc"
207FILES_${PN} =+ "${libdir}/ssl-1.1/*"
208FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/openssl.sh"
209
210CONFFILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf"
211
212RRECOMMENDS_libcrypto += "openssl-conf"
213RDEPENDS_${PN}-ptest += "openssl-bin perl perl-modules bash"
214
215BBCLASSEXTEND = "native nativesdk"
216
217CVE_PRODUCT = "openssl:openssl"