summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/openssl
diff options
context:
space:
mode:
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>2017-08-08 18:30:48 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-13 09:27:38 +0100
commite326733d69181a03af7a4f837ea78fce348fdf00 (patch)
treef2b049b04bf94693ad017ac68df139b4ed655c65 /meta/recipes-connectivity/openssl
parent04891b31e62f37e692647399fa3534d3dd4ab7f9 (diff)
downloadpoky-e326733d69181a03af7a4f837ea78fce348fdf00.tar.gz
openssl: add a 1.1 version
Existing openssl 1.0 recipe is renamed to openssl10; it will continue to be provided for as long as upstream supports it (and there are still several recipes which do not work with openssl 1.1 due to API differences). A few files (such as openssl binary) are no longer installed by openssl 1.0, because they clash with openssl 1.1. (From OE-Core rev: da1183f9fa5e06fbe66b5b31eb3313d5d35d11e3) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.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')
-rw-r--r--meta/recipes-connectivity/openssl/openssl/0001-Remove-test-that-requires-running-as-non-root.patch49
-rw-r--r--meta/recipes-connectivity/openssl/openssl/0001-Take-linking-flags-from-LDFLAGS-env-var.patch43
-rw-r--r--[-rwxr-xr-x]meta/recipes-connectivity/openssl/openssl/run-ptest4
-rw-r--r--meta/recipes-connectivity/openssl/openssl10.inc (renamed from meta/recipes-connectivity/openssl/openssl.inc)14
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/0001-Fix-build-with-clang-using-external-assembler.patch (renamed from meta/recipes-connectivity/openssl/openssl/0001-Fix-build-with-clang-using-external-assembler.patch)0
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/Makefiles-ptest.patch (renamed from meta/recipes-connectivity/openssl/openssl/Makefiles-ptest.patch)0
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/Use-SHA256-not-MD5-as-default-digest.patch (renamed from meta/recipes-connectivity/openssl/openssl/Use-SHA256-not-MD5-as-default-digest.patch)0
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/configure-musl-target.patch (renamed from meta/recipes-connectivity/openssl/openssl/configure-musl-target.patch)0
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/configure-targets.patch (renamed from meta/recipes-connectivity/openssl/openssl/configure-targets.patch)0
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/debian/c_rehash-compat.patch (renamed from meta/recipes-connectivity/openssl/openssl/debian/c_rehash-compat.patch)0
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/debian/ca.patch (renamed from meta/recipes-connectivity/openssl/openssl/debian/ca.patch)0
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/debian/debian-targets.patch (renamed from meta/recipes-connectivity/openssl/openssl/debian/debian-targets.patch)0
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/debian/man-dir.patch (renamed from meta/recipes-connectivity/openssl/openssl/debian/man-dir.patch)0
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/debian/man-section.patch (renamed from meta/recipes-connectivity/openssl/openssl/debian/man-section.patch)0
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/debian/no-rpath.patch (renamed from meta/recipes-connectivity/openssl/openssl/debian/no-rpath.patch)0
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/debian/no-symbolic.patch (renamed from meta/recipes-connectivity/openssl/openssl/debian/no-symbolic.patch)0
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/debian/pic.patch (renamed from meta/recipes-connectivity/openssl/openssl/debian/pic.patch)0
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/debian/version-script.patch (renamed from meta/recipes-connectivity/openssl/openssl/debian/version-script.patch)0
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/debian1.0.2/block_digicert_malaysia.patch (renamed from meta/recipes-connectivity/openssl/openssl/debian1.0.2/block_digicert_malaysia.patch)0
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/debian1.0.2/block_diginotar.patch (renamed from meta/recipes-connectivity/openssl/openssl/debian1.0.2/block_diginotar.patch)0
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/debian1.0.2/soname.patch (renamed from meta/recipes-connectivity/openssl/openssl/debian1.0.2/soname.patch)0
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/debian1.0.2/version-script.patch (renamed from meta/recipes-connectivity/openssl/openssl/debian1.0.2/version-script.patch)0
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/engines-install-in-libdir-ssl.patch (renamed from meta/recipes-connectivity/openssl/openssl/engines-install-in-libdir-ssl.patch)0
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/find.pl (renamed from meta/recipes-connectivity/openssl/openssl/find.pl)0
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/oe-ldflags.patch (renamed from meta/recipes-connectivity/openssl/openssl/oe-ldflags.patch)0
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/openssl-1.0.2a-x32-asm.patch (renamed from meta/recipes-connectivity/openssl/openssl/openssl-1.0.2a-x32-asm.patch)0
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/openssl-c_rehash.sh222
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/openssl-fix-des.pod-error.patch (renamed from meta/recipes-connectivity/openssl/openssl/openssl-fix-des.pod-error.patch)0
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/openssl-util-perlpath.pl-cwd.patch (renamed from meta/recipes-connectivity/openssl/openssl/openssl-util-perlpath.pl-cwd.patch)0
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/openssl_fix_for_x32.patch (renamed from meta/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch)0
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/parallel.patch (renamed from meta/recipes-connectivity/openssl/openssl/parallel.patch)0
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/ptest-deps.patch (renamed from meta/recipes-connectivity/openssl/openssl/ptest-deps.patch)0
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/ptest_makefile_deps.patch (renamed from meta/recipes-connectivity/openssl/openssl/ptest_makefile_deps.patch)0
-rwxr-xr-xmeta/recipes-connectivity/openssl/openssl10/run-ptest2
-rw-r--r--meta/recipes-connectivity/openssl/openssl10/shared-libs.patch (renamed from meta/recipes-connectivity/openssl/openssl/shared-libs.patch)0
-rw-r--r--meta/recipes-connectivity/openssl/openssl10_1.0.2l.bb (renamed from meta/recipes-connectivity/openssl/openssl_1.0.2l.bb)4
-rw-r--r--meta/recipes-connectivity/openssl/openssl_1.1.0f.bb155
37 files changed, 488 insertions, 5 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl/0001-Remove-test-that-requires-running-as-non-root.patch b/meta/recipes-connectivity/openssl/openssl/0001-Remove-test-that-requires-running-as-non-root.patch
new file mode 100644
index 0000000000..736bb39acd
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl/0001-Remove-test-that-requires-running-as-non-root.patch
@@ -0,0 +1,49 @@
1From 3fdb1e2a16ea405c6731447a8994f222808ef7e6 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 7 Apr 2017 18:01:52 +0300
4Subject: [PATCH] Remove test that requires running as non-root
5
6Upstream-Status: Inappropriate [oe-core specific]
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8---
9 test/recipes/40-test_rehash.t | 17 +----------------
10 1 file changed, 1 insertion(+), 16 deletions(-)
11
12diff --git a/test/recipes/40-test_rehash.t b/test/recipes/40-test_rehash.t
13index f902c23..c7567c1 100644
14--- a/test/recipes/40-test_rehash.t
15+++ b/test/recipes/40-test_rehash.t
16@@ -23,7 +23,7 @@ setup("test_rehash");
17 plan skip_all => "test_rehash is not available on this platform"
18 unless run(app(["openssl", "rehash", "-help"]));
19
20-plan tests => 5;
21+plan tests => 3;
22
23 indir "rehash.$$" => sub {
24 prepare();
25@@ -42,21 +42,6 @@ indir "rehash.$$" => sub {
26 'Testing rehash operations on empty directory');
27 }, create => 1, cleanup => 1;
28
29-indir "rehash.$$" => sub {
30- prepare();
31- chmod 0500, curdir();
32- SKIP: {
33- if (!ok(!open(FOO, ">unwritable.txt"),
34- "Testing that we aren't running as a privileged user, such as root")) {
35- close FOO;
36- skip "It's pointless to run the next test as root", 1;
37- }
38- isnt(run(app(["openssl", "rehash", curdir()])), 1,
39- 'Testing rehash operations on readonly directory');
40- }
41- chmod 0700, curdir(); # make it writable again, so cleanup works
42-}, create => 1, cleanup => 1;
43-
44 sub prepare {
45 my @pemsourcefiles = sort glob(srctop_file('test', "*.pem"));
46 my @destfiles = ();
47--
482.11.0
49
diff --git a/meta/recipes-connectivity/openssl/openssl/0001-Take-linking-flags-from-LDFLAGS-env-var.patch b/meta/recipes-connectivity/openssl/openssl/0001-Take-linking-flags-from-LDFLAGS-env-var.patch
new file mode 100644
index 0000000000..6ce4e47d71
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl/0001-Take-linking-flags-from-LDFLAGS-env-var.patch
@@ -0,0 +1,43 @@
1From 08face4353d80111973aba9c1304c92158cfad0e Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Tue, 28 Mar 2017 16:40:12 +0300
4Subject: [PATCH] Take linking flags from LDFLAGS env var
5
6This fixes "No GNU_HASH in the elf binary" issues.
7
8Upstream-Status: Inappropriate [oe-core specific]
9Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
10---
11 Configurations/unix-Makefile.tmpl | 2 +-
12 Configure | 2 +-
13 2 files changed, 2 insertions(+), 2 deletions(-)
14
15diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
16index c029817..43b769b 100644
17--- a/Configurations/unix-Makefile.tmpl
18+++ b/Configurations/unix-Makefile.tmpl
19@@ -173,7 +173,7 @@ CROSS_COMPILE= {- $config{cross_compile_prefix} -}
20 CC= $(CROSS_COMPILE){- $target{cc} -}
21 CFLAGS={- our $cflags2 = join(" ",(map { "-D".$_} @{$target{defines}}, @{$config{defines}}),"-DOPENSSLDIR=\"\\\"\$(OPENSSLDIR)\\\"\"","-DENGINESDIR=\"\\\"\$(ENGINESDIR)\\\"\"") -} {- $target{cflags} -} {- $config{cflags} -}
22 CFLAGS_Q={- $cflags2 =~ s|([\\"])|\\$1|g; $cflags2 -} {- $config{cflags} -}
23-LDFLAGS= {- $target{lflags} -}
24+LDFLAGS= {- $target{lflags}." ".$ENV{'LDFLAGS'} -}
25 PLIB_LDFLAGS= {- $target{plib_lflags} -}
26 EX_LIBS= {- $target{ex_libs} -} {- $config{ex_libs} -}
27 LIB_CFLAGS={- $target{shared_cflag} || "" -}
28diff --git a/Configure b/Configure
29index aee7cc3..274d236 100755
30--- a/Configure
31+++ b/Configure
32@@ -979,7 +979,7 @@ $config{build_file} = $target{build_file};
33 $config{defines} = [];
34 $config{cflags} = "";
35 $config{ex_libs} = "";
36-$config{shared_ldflag} = "";
37+$config{shared_ldflag} = $ENV{'LDFLAGS'};
38
39 # Make sure build_scheme is consistent.
40 $target{build_scheme} = [ $target{build_scheme} ]
41--
422.11.0
43
diff --git a/meta/recipes-connectivity/openssl/openssl/run-ptest b/meta/recipes-connectivity/openssl/openssl/run-ptest
index 3b20fce1ee..65c6cc7b86 100755..100644
--- a/meta/recipes-connectivity/openssl/openssl/run-ptest
+++ b/meta/recipes-connectivity/openssl/openssl/run-ptest
@@ -1,2 +1,4 @@
1#!/bin/sh 1#!/bin/sh
2make -k runtest 2cd test
3OPENSSL_ENGINES=../engines BLDTOP=.. SRCTOP=.. perl run_tests.pl
4cd ..
diff --git a/meta/recipes-connectivity/openssl/openssl.inc b/meta/recipes-connectivity/openssl/openssl10.inc
index 0d6442e564..c93d5d8738 100644
--- a/meta/recipes-connectivity/openssl/openssl.inc
+++ b/meta/recipes-connectivity/openssl/openssl10.inc
@@ -37,8 +37,6 @@ FILES_${PN} =+ " ${libdir}/ssl/*"
37FILES_${PN}-misc = "${libdir}/ssl/misc" 37FILES_${PN}-misc = "${libdir}/ssl/misc"
38RDEPENDS_${PN}-misc = "${@bb.utils.filter('PACKAGECONFIG', 'perl', d)}" 38RDEPENDS_${PN}-misc = "${@bb.utils.filter('PACKAGECONFIG', 'perl', d)}"
39 39
40PROVIDES += "openssl10"
41
42# Add the openssl.cnf file to the openssl-conf package. Make the libcrypto 40# Add the openssl.cnf file to the openssl-conf package. Make the libcrypto
43# package RRECOMMENDS on this package. This will enable the configuration 41# package RRECOMMENDS on this package. This will enable the configuration
44# file to be installed for both the base openssl package and the libcrypto 42# file to be installed for both the base openssl package and the libcrypto
@@ -254,3 +252,15 @@ do_install_append_class-native() {
254} 252}
255 253
256BBCLASSEXTEND = "native nativesdk" 254BBCLASSEXTEND = "native nativesdk"
255
256PACKAGE_PREPROCESS_FUNCS += "openssl_package_preprocess"
257
258openssl_package_preprocess () {
259 for file in `find ${PKGD} -name *.h -o -name *.pc -o -name *.so`; do
260 rm $file
261 done
262 rm ${PKGD}/usr/bin/openssl
263 rm ${PKGD}/usr/bin/c_rehash
264 rmdir ${PKGD}/usr/bin
265
266}
diff --git a/meta/recipes-connectivity/openssl/openssl/0001-Fix-build-with-clang-using-external-assembler.patch b/meta/recipes-connectivity/openssl/openssl10/0001-Fix-build-with-clang-using-external-assembler.patch
index 2270962a6f..2270962a6f 100644
--- a/meta/recipes-connectivity/openssl/openssl/0001-Fix-build-with-clang-using-external-assembler.patch
+++ b/meta/recipes-connectivity/openssl/openssl10/0001-Fix-build-with-clang-using-external-assembler.patch
diff --git a/meta/recipes-connectivity/openssl/openssl/Makefiles-ptest.patch b/meta/recipes-connectivity/openssl/openssl10/Makefiles-ptest.patch
index 249446a5bd..249446a5bd 100644
--- a/meta/recipes-connectivity/openssl/openssl/Makefiles-ptest.patch
+++ b/meta/recipes-connectivity/openssl/openssl10/Makefiles-ptest.patch
diff --git a/meta/recipes-connectivity/openssl/openssl/Use-SHA256-not-MD5-as-default-digest.patch b/meta/recipes-connectivity/openssl/openssl10/Use-SHA256-not-MD5-as-default-digest.patch
index 58c9ee7844..58c9ee7844 100644
--- a/meta/recipes-connectivity/openssl/openssl/Use-SHA256-not-MD5-as-default-digest.patch
+++ b/meta/recipes-connectivity/openssl/openssl10/Use-SHA256-not-MD5-as-default-digest.patch
diff --git a/meta/recipes-connectivity/openssl/openssl/configure-musl-target.patch b/meta/recipes-connectivity/openssl/openssl10/configure-musl-target.patch
index f357b3f59f..f357b3f59f 100644
--- a/meta/recipes-connectivity/openssl/openssl/configure-musl-target.patch
+++ b/meta/recipes-connectivity/openssl/openssl10/configure-musl-target.patch
diff --git a/meta/recipes-connectivity/openssl/openssl/configure-targets.patch b/meta/recipes-connectivity/openssl/openssl10/configure-targets.patch
index 1e01589722..1e01589722 100644
--- a/meta/recipes-connectivity/openssl/openssl/configure-targets.patch
+++ b/meta/recipes-connectivity/openssl/openssl10/configure-targets.patch
diff --git a/meta/recipes-connectivity/openssl/openssl/debian/c_rehash-compat.patch b/meta/recipes-connectivity/openssl/openssl10/debian/c_rehash-compat.patch
index 68e54d561e..68e54d561e 100644
--- a/meta/recipes-connectivity/openssl/openssl/debian/c_rehash-compat.patch
+++ b/meta/recipes-connectivity/openssl/openssl10/debian/c_rehash-compat.patch
diff --git a/meta/recipes-connectivity/openssl/openssl/debian/ca.patch b/meta/recipes-connectivity/openssl/openssl10/debian/ca.patch
index fb745e4394..fb745e4394 100644
--- a/meta/recipes-connectivity/openssl/openssl/debian/ca.patch
+++ b/meta/recipes-connectivity/openssl/openssl10/debian/ca.patch
diff --git a/meta/recipes-connectivity/openssl/openssl/debian/debian-targets.patch b/meta/recipes-connectivity/openssl/openssl10/debian/debian-targets.patch
index 39d4328184..39d4328184 100644
--- a/meta/recipes-connectivity/openssl/openssl/debian/debian-targets.patch
+++ b/meta/recipes-connectivity/openssl/openssl10/debian/debian-targets.patch
diff --git a/meta/recipes-connectivity/openssl/openssl/debian/man-dir.patch b/meta/recipes-connectivity/openssl/openssl10/debian/man-dir.patch
index 4085e3b1d7..4085e3b1d7 100644
--- a/meta/recipes-connectivity/openssl/openssl/debian/man-dir.patch
+++ b/meta/recipes-connectivity/openssl/openssl10/debian/man-dir.patch
diff --git a/meta/recipes-connectivity/openssl/openssl/debian/man-section.patch b/meta/recipes-connectivity/openssl/openssl10/debian/man-section.patch
index 21c1d1a4eb..21c1d1a4eb 100644
--- a/meta/recipes-connectivity/openssl/openssl/debian/man-section.patch
+++ b/meta/recipes-connectivity/openssl/openssl10/debian/man-section.patch
diff --git a/meta/recipes-connectivity/openssl/openssl/debian/no-rpath.patch b/meta/recipes-connectivity/openssl/openssl10/debian/no-rpath.patch
index 1ccb3b86ee..1ccb3b86ee 100644
--- a/meta/recipes-connectivity/openssl/openssl/debian/no-rpath.patch
+++ b/meta/recipes-connectivity/openssl/openssl10/debian/no-rpath.patch
diff --git a/meta/recipes-connectivity/openssl/openssl/debian/no-symbolic.patch b/meta/recipes-connectivity/openssl/openssl10/debian/no-symbolic.patch
index cc4408ab7d..cc4408ab7d 100644
--- a/meta/recipes-connectivity/openssl/openssl/debian/no-symbolic.patch
+++ b/meta/recipes-connectivity/openssl/openssl10/debian/no-symbolic.patch
diff --git a/meta/recipes-connectivity/openssl/openssl/debian/pic.patch b/meta/recipes-connectivity/openssl/openssl10/debian/pic.patch
index bfda3888bf..bfda3888bf 100644
--- a/meta/recipes-connectivity/openssl/openssl/debian/pic.patch
+++ b/meta/recipes-connectivity/openssl/openssl10/debian/pic.patch
diff --git a/meta/recipes-connectivity/openssl/openssl/debian/version-script.patch b/meta/recipes-connectivity/openssl/openssl10/debian/version-script.patch
index 557434fcb5..557434fcb5 100644
--- a/meta/recipes-connectivity/openssl/openssl/debian/version-script.patch
+++ b/meta/recipes-connectivity/openssl/openssl10/debian/version-script.patch
diff --git a/meta/recipes-connectivity/openssl/openssl/debian1.0.2/block_digicert_malaysia.patch b/meta/recipes-connectivity/openssl/openssl10/debian1.0.2/block_digicert_malaysia.patch
index c43bcd1c77..c43bcd1c77 100644
--- a/meta/recipes-connectivity/openssl/openssl/debian1.0.2/block_digicert_malaysia.patch
+++ b/meta/recipes-connectivity/openssl/openssl10/debian1.0.2/block_digicert_malaysia.patch
diff --git a/meta/recipes-connectivity/openssl/openssl/debian1.0.2/block_diginotar.patch b/meta/recipes-connectivity/openssl/openssl10/debian1.0.2/block_diginotar.patch
index d81e22cd8d..d81e22cd8d 100644
--- a/meta/recipes-connectivity/openssl/openssl/debian1.0.2/block_diginotar.patch
+++ b/meta/recipes-connectivity/openssl/openssl10/debian1.0.2/block_diginotar.patch
diff --git a/meta/recipes-connectivity/openssl/openssl/debian1.0.2/soname.patch b/meta/recipes-connectivity/openssl/openssl10/debian1.0.2/soname.patch
index 09dd9eaf86..09dd9eaf86 100644
--- a/meta/recipes-connectivity/openssl/openssl/debian1.0.2/soname.patch
+++ b/meta/recipes-connectivity/openssl/openssl10/debian1.0.2/soname.patch
diff --git a/meta/recipes-connectivity/openssl/openssl/debian1.0.2/version-script.patch b/meta/recipes-connectivity/openssl/openssl10/debian1.0.2/version-script.patch
index e404ee3312..e404ee3312 100644
--- a/meta/recipes-connectivity/openssl/openssl/debian1.0.2/version-script.patch
+++ b/meta/recipes-connectivity/openssl/openssl10/debian1.0.2/version-script.patch
diff --git a/meta/recipes-connectivity/openssl/openssl/engines-install-in-libdir-ssl.patch b/meta/recipes-connectivity/openssl/openssl10/engines-install-in-libdir-ssl.patch
index a5746483e6..a5746483e6 100644
--- a/meta/recipes-connectivity/openssl/openssl/engines-install-in-libdir-ssl.patch
+++ b/meta/recipes-connectivity/openssl/openssl10/engines-install-in-libdir-ssl.patch
diff --git a/meta/recipes-connectivity/openssl/openssl/find.pl b/meta/recipes-connectivity/openssl/openssl10/find.pl
index 8e1b42c88a..8e1b42c88a 100644
--- a/meta/recipes-connectivity/openssl/openssl/find.pl
+++ b/meta/recipes-connectivity/openssl/openssl10/find.pl
diff --git a/meta/recipes-connectivity/openssl/openssl/oe-ldflags.patch b/meta/recipes-connectivity/openssl/openssl10/oe-ldflags.patch
index 292e13dc5f..292e13dc5f 100644
--- a/meta/recipes-connectivity/openssl/openssl/oe-ldflags.patch
+++ b/meta/recipes-connectivity/openssl/openssl10/oe-ldflags.patch
diff --git a/meta/recipes-connectivity/openssl/openssl/openssl-1.0.2a-x32-asm.patch b/meta/recipes-connectivity/openssl/openssl10/openssl-1.0.2a-x32-asm.patch
index 1e5bfa17d6..1e5bfa17d6 100644
--- a/meta/recipes-connectivity/openssl/openssl/openssl-1.0.2a-x32-asm.patch
+++ b/meta/recipes-connectivity/openssl/openssl10/openssl-1.0.2a-x32-asm.patch
diff --git a/meta/recipes-connectivity/openssl/openssl10/openssl-c_rehash.sh b/meta/recipes-connectivity/openssl/openssl10/openssl-c_rehash.sh
new file mode 100644
index 0000000000..6620fdcb53
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl10/openssl-c_rehash.sh
@@ -0,0 +1,222 @@
1#!/bin/sh
2#
3# Ben Secrest <blsecres@gmail.com>
4#
5# sh c_rehash script, scan all files in a directory
6# and add symbolic links to their hash values.
7#
8# based on the c_rehash perl script distributed with openssl
9#
10# LICENSE: See OpenSSL license
11# ^^acceptable?^^
12#
13
14# default certificate location
15DIR=/etc/openssl
16
17# for filetype bitfield
18IS_CERT=$(( 1 << 0 ))
19IS_CRL=$(( 1 << 1 ))
20
21
22# check to see if a file is a certificate file or a CRL file
23# arguments:
24# 1. the filename to be scanned
25# returns:
26# bitfield of file type; uses ${IS_CERT} and ${IS_CRL}
27#
28check_file()
29{
30 local IS_TYPE=0
31
32 # make IFS a newline so we can process grep output line by line
33 local OLDIFS=${IFS}
34 IFS=$( printf "\n" )
35
36 # XXX: could be more efficient to have two 'grep -m' but is -m portable?
37 for LINE in $( grep '^-----BEGIN .*-----' ${1} )
38 do
39 if echo ${LINE} \
40 | grep -q -E '^-----BEGIN (X509 |TRUSTED )?CERTIFICATE-----'
41 then
42 IS_TYPE=$(( ${IS_TYPE} | ${IS_CERT} ))
43
44 if [ $(( ${IS_TYPE} & ${IS_CRL} )) -ne 0 ]
45 then
46 break
47 fi
48 elif echo ${LINE} | grep -q '^-----BEGIN X509 CRL-----'
49 then
50 IS_TYPE=$(( ${IS_TYPE} | ${IS_CRL} ))
51
52 if [ $(( ${IS_TYPE} & ${IS_CERT} )) -ne 0 ]
53 then
54 break
55 fi
56 fi
57 done
58
59 # restore IFS
60 IFS=${OLDIFS}
61
62 return ${IS_TYPE}
63}
64
65
66#
67# use openssl to fingerprint a file
68# arguments:
69# 1. the filename to fingerprint
70# 2. the method to use (x509, crl)
71# returns:
72# none
73# assumptions:
74# user will capture output from last stage of pipeline
75#
76fingerprint()
77{
78 ${SSL_CMD} ${2} -fingerprint -noout -in ${1} | sed 's/^.*=//' | tr -d ':'
79}
80
81
82#
83# link_hash - create links to certificate files
84# arguments:
85# 1. the filename to create a link for
86# 2. the type of certificate being linked (x509, crl)
87# returns:
88# 0 on success, 1 otherwise
89#
90link_hash()
91{
92 local FINGERPRINT=$( fingerprint ${1} ${2} )
93 local HASH=$( ${SSL_CMD} ${2} -hash -noout -in ${1} )
94 local SUFFIX=0
95 local LINKFILE=''
96 local TAG=''
97
98 if [ ${2} = "crl" ]
99 then
100 TAG='r'
101 fi
102
103 LINKFILE=${HASH}.${TAG}${SUFFIX}
104
105 while [ -f ${LINKFILE} ]
106 do
107 if [ ${FINGERPRINT} = $( fingerprint ${LINKFILE} ${2} ) ]
108 then
109 echo "NOTE: Skipping duplicate file ${1}" >&2
110 return 1
111 fi
112
113 SUFFIX=$(( ${SUFFIX} + 1 ))
114 LINKFILE=${HASH}.${TAG}${SUFFIX}
115 done
116
117 echo "${3} => ${LINKFILE}"
118
119 # assume any system with a POSIX shell will either support symlinks or
120 # do something to handle this gracefully
121 ln -s ${3} ${LINKFILE}
122
123 return 0
124}
125
126
127# hash_dir create hash links in a given directory
128hash_dir()
129{
130 echo "Doing ${1}"
131
132 cd ${1}
133
134 ls -1 * 2>/dev/null | while read FILE
135 do
136 if echo ${FILE} | grep -q -E '^[[:xdigit:]]{8}\.r?[[:digit:]]+$' \
137 && [ -h "${FILE}" ]
138 then
139 rm ${FILE}
140 fi
141 done
142
143 ls -1 *.pem *.cer *.crt *.crl 2>/dev/null | while read FILE
144 do
145 REAL_FILE=${FILE}
146 # if we run on build host then get to the real files in rootfs
147 if [ -n "${SYSROOT}" -a -h ${FILE} ]
148 then
149 FILE=$( readlink ${FILE} )
150 # check the symlink is absolute (or dangling in other word)
151 if [ "x/" = "x$( echo ${FILE} | cut -c1 -)" ]
152 then
153 REAL_FILE=${SYSROOT}/${FILE}
154 fi
155 fi
156
157 check_file ${REAL_FILE}
158 local FILE_TYPE=${?}
159 local TYPE_STR=''
160
161 if [ $(( ${FILE_TYPE} & ${IS_CERT} )) -ne 0 ]
162 then
163 TYPE_STR='x509'
164 elif [ $(( ${FILE_TYPE} & ${IS_CRL} )) -ne 0 ]
165 then
166 TYPE_STR='crl'
167 else
168 echo "NOTE: ${FILE} does not contain a certificate or CRL: skipping" >&2
169 continue
170 fi
171
172 link_hash ${REAL_FILE} ${TYPE_STR} ${FILE}
173 done
174}
175
176
177# choose the name of an ssl application
178if [ -n "${OPENSSL}" ]
179then
180 SSL_CMD=$(which ${OPENSSL} 2>/dev/null)
181else
182 SSL_CMD=/usr/bin/openssl
183 OPENSSL=${SSL_CMD}
184 export OPENSSL
185fi
186
187# fix paths
188PATH=${PATH}:${DIR}/bin
189export PATH
190
191# confirm existance/executability of ssl command
192if ! [ -x ${SSL_CMD} ]
193then
194 echo "${0}: rehashing skipped ('openssl' program not available)" >&2
195 exit 0
196fi
197
198# determine which directories to process
199old_IFS=$IFS
200if [ ${#} -gt 0 ]
201then
202 IFS=':'
203 DIRLIST=${*}
204elif [ -n "${SSL_CERT_DIR}" ]
205then
206 DIRLIST=$SSL_CERT_DIR
207else
208 DIRLIST=${DIR}/certs
209fi
210
211IFS=':'
212
213# process directories
214for CERT_DIR in ${DIRLIST}
215do
216 if [ -d ${CERT_DIR} -a -w ${CERT_DIR} ]
217 then
218 IFS=$old_IFS
219 hash_dir ${CERT_DIR}
220 IFS=':'
221 fi
222done
diff --git a/meta/recipes-connectivity/openssl/openssl/openssl-fix-des.pod-error.patch b/meta/recipes-connectivity/openssl/openssl10/openssl-fix-des.pod-error.patch
index de49729e5e..de49729e5e 100644
--- a/meta/recipes-connectivity/openssl/openssl/openssl-fix-des.pod-error.patch
+++ b/meta/recipes-connectivity/openssl/openssl10/openssl-fix-des.pod-error.patch
diff --git a/meta/recipes-connectivity/openssl/openssl/openssl-util-perlpath.pl-cwd.patch b/meta/recipes-connectivity/openssl/openssl10/openssl-util-perlpath.pl-cwd.patch
index 065b9b122a..065b9b122a 100644
--- a/meta/recipes-connectivity/openssl/openssl/openssl-util-perlpath.pl-cwd.patch
+++ b/meta/recipes-connectivity/openssl/openssl10/openssl-util-perlpath.pl-cwd.patch
diff --git a/meta/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch b/meta/recipes-connectivity/openssl/openssl10/openssl_fix_for_x32.patch
index 0f08a642f6..0f08a642f6 100644
--- a/meta/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch
+++ b/meta/recipes-connectivity/openssl/openssl10/openssl_fix_for_x32.patch
diff --git a/meta/recipes-connectivity/openssl/openssl/parallel.patch b/meta/recipes-connectivity/openssl/openssl10/parallel.patch
index f3f4c99888..f3f4c99888 100644
--- a/meta/recipes-connectivity/openssl/openssl/parallel.patch
+++ b/meta/recipes-connectivity/openssl/openssl10/parallel.patch
diff --git a/meta/recipes-connectivity/openssl/openssl/ptest-deps.patch b/meta/recipes-connectivity/openssl/openssl10/ptest-deps.patch
index ef6d17934d..ef6d17934d 100644
--- a/meta/recipes-connectivity/openssl/openssl/ptest-deps.patch
+++ b/meta/recipes-connectivity/openssl/openssl10/ptest-deps.patch
diff --git a/meta/recipes-connectivity/openssl/openssl/ptest_makefile_deps.patch b/meta/recipes-connectivity/openssl/openssl10/ptest_makefile_deps.patch
index 4202e61d1e..4202e61d1e 100644
--- a/meta/recipes-connectivity/openssl/openssl/ptest_makefile_deps.patch
+++ b/meta/recipes-connectivity/openssl/openssl10/ptest_makefile_deps.patch
diff --git a/meta/recipes-connectivity/openssl/openssl10/run-ptest b/meta/recipes-connectivity/openssl/openssl10/run-ptest
new file mode 100755
index 0000000000..3b20fce1ee
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl10/run-ptest
@@ -0,0 +1,2 @@
1#!/bin/sh
2make -k runtest
diff --git a/meta/recipes-connectivity/openssl/openssl/shared-libs.patch b/meta/recipes-connectivity/openssl/openssl10/shared-libs.patch
index a7ca0a3078..a7ca0a3078 100644
--- a/meta/recipes-connectivity/openssl/openssl/shared-libs.patch
+++ b/meta/recipes-connectivity/openssl/openssl10/shared-libs.patch
diff --git a/meta/recipes-connectivity/openssl/openssl_1.0.2l.bb b/meta/recipes-connectivity/openssl/openssl10_1.0.2l.bb
index a2ef2ac8fb..cf0459c94b 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.0.2l.bb
+++ b/meta/recipes-connectivity/openssl/openssl10_1.0.2l.bb
@@ -1,4 +1,4 @@
1require openssl.inc 1require openssl10.inc
2 2
3# For target side versions of openssl enable support for OCF Linux driver 3# For target side versions of openssl enable support for OCF Linux driver
4# if they are available. 4# if they are available.
@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=057d9218c6180e1d9ee407572b2dd225"
12export DIRS = "crypto ssl apps engines" 12export DIRS = "crypto ssl apps engines"
13export OE_LDFLAGS="${LDFLAGS}" 13export OE_LDFLAGS="${LDFLAGS}"
14 14
15SRC_URI += "file://find.pl;subdir=${BP}/util/ \ 15SRC_URI += "file://find.pl;subdir=openssl-${PV}/util/ \
16 file://run-ptest \ 16 file://run-ptest \
17 file://openssl-c_rehash.sh \ 17 file://openssl-c_rehash.sh \
18 file://configure-targets.patch \ 18 file://configure-targets.patch \
diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.0f.bb b/meta/recipes-connectivity/openssl/openssl_1.1.0f.bb
new file mode 100644
index 0000000000..8fedab522f
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl_1.1.0f.bb
@@ -0,0 +1,155 @@
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
7# "openssl | SSLeay" dual license
8LICENSE = "openssl"
9LIC_FILES_CHKSUM = "file://LICENSE;md5=cae6da10f4ffd9703214776d2aabce32"
10
11BBCLASSEXTEND = "native nativesdk"
12
13SRC_URI[md5sum] = "7b521dea79ab159e8ec879d2333369fa"
14SRC_URI[sha256sum] = "12f746f3f2493b2f39da7ecf63d7ee19c6ac9ec6a4fcd8c229da8a522cb12765"
15
16SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
17 file://run-ptest \
18 file://openssl-c_rehash.sh \
19 file://0001-Take-linking-flags-from-LDFLAGS-env-var.patch \
20 file://0001-Remove-test-that-requires-running-as-non-root.patch \
21 "
22
23S = "${WORKDIR}/openssl-${PV}"
24
25inherit lib_package multilib_header ptest
26
27do_configure () {
28 os=${HOST_OS}
29 case $os in
30 linux-uclibc |\
31 linux-uclibceabi |\
32 linux-gnueabi |\
33 linux-uclibcspe |\
34 linux-gnuspe |\
35 linux-musl*)
36 os=linux
37 ;;
38 *)
39 ;;
40 esac
41 target="$os-${HOST_ARCH}"
42 case $target in
43 linux-arm)
44 target=linux-armv4
45 ;;
46 linux-armeb)
47 target=linux-armv4
48 ;;
49 linux-aarch64*)
50 target=linux-aarch64
51 ;;
52 linux-sh3)
53 target=linux-generic32
54 ;;
55 linux-sh4)
56 target=linux-generic32
57 ;;
58 linux-i486)
59 target=linux-elf
60 ;;
61 linux-i586 | linux-viac3)
62 target=linux-elf
63 ;;
64 linux-i686)
65 target=linux-elf
66 ;;
67 linux-gnux32-x86_64)
68 target=linux-x32
69 ;;
70 linux-gnu64-x86_64)
71 target=linux-x86_64
72 ;;
73 linux-mips)
74 # specifying TARGET_CC_ARCH prevents openssl from (incorrectly) adding target architecture flags
75 target="linux-mips32 ${TARGET_CC_ARCH}"
76 ;;
77 linux-mipsel)
78 target="linux-mips32 ${TARGET_CC_ARCH}"
79 ;;
80 linux-gnun32-mips*)
81 target=linux-mips64
82 ;;
83 linux-*-mips64 | linux-mips64)
84 target=linux64-mips64
85 ;;
86 linux-*-mips64el | linux-mips64el)
87 target=linux64-mips64
88 ;;
89 linux-microblaze*|linux-nios2*)
90 target=linux-generic32
91 ;;
92 linux-powerpc)
93 target=linux-ppc
94 ;;
95 linux-powerpc64)
96 target=linux-ppc64
97 ;;
98 linux-supersparc)
99 target=linux-sparcv9
100 ;;
101 linux-sparc)
102 target=linux-sparcv9
103 ;;
104 darwin-i386)
105 target=darwin-i386-cc
106 ;;
107 esac
108 useprefix=${prefix}
109 if [ "x$useprefix" = "x" ]; then
110 useprefix=/
111 fi
112 perl ./Configure ${EXTRA_OECONF} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=`basename ${libdir}` $target
113}
114
115#| engines/afalg/e_afalg.c: In function 'eventfd':
116#| engines/afalg/e_afalg.c:110:20: error: '__NR_eventfd' undeclared (first use in this function)
117#| return syscall(__NR_eventfd, n);
118#| ^~~~~~~~~~~~
119EXTRA_OECONF_aarch64 += "no-afalgeng"
120
121#| ./libcrypto.so: undefined reference to `getcontext'
122#| ./libcrypto.so: undefined reference to `setcontext'
123#| ./libcrypto.so: undefined reference to `makecontext'
124EXTRA_OECONF_libc-musl += "-DOPENSSL_NO_ASYNC"
125
126do_install () {
127 oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install
128 oe_multilib_header openssl/opensslconf.h
129}
130
131do_install_append_class-native () {
132 # Install a custom version of c_rehash that can handle sysroots properly.
133 # This version is used for example when installing ca-certificates during
134 # image creation.
135 install -Dm 0755 ${WORKDIR}/openssl-c_rehash.sh ${D}${bindir}/c_rehash
136 sed -i -e 's,/etc/openssl,${sysconfdir}/ssl,g' ${D}${bindir}/c_rehash
137}
138
139do_install_ptest() {
140 cp -r * ${D}${PTEST_PATH}
141
142 # Putting .so files in ptest package will mess up the dependencies of the main openssl package
143 # so we rename them to .so.ptest and patch the test accordingly
144 mv ${D}${PTEST_PATH}/libcrypto.so ${D}${PTEST_PATH}/libcrypto.so.ptest
145 mv ${D}${PTEST_PATH}/libssl.so ${D}${PTEST_PATH}/libssl.so.ptest
146 sed -i 's/$target{shared_extension_simple}/".so.ptest"/' ${D}${PTEST_PATH}/test/recipes/90-test_shlibload.t
147}
148
149RDEPENDS_${PN}-ptest += "perl-module-file-spec-functions"
150
151FILES_${PN} =+ " ${libdir}/ssl-1.1/*"
152
153PACKAGES =+ "${PN}-engines"
154FILES_${PN}-engines = "${libdir}/engines-1.1"
155