commit:     e875040ac623c2937f6d2a6592e57494ba0d07ad
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 30 19:20:37 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jun 30 19:32:44 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e875040a

dev-libs/openssl: backport test fix for 1.1.1p

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/openssl-1.1.1p-fix-test-build.patch      | 46 ++++++++++++++++++++++
 dev-libs/openssl/openssl-1.1.1p.ebuild             |  3 +-
 profiles/package.mask                              |  4 +-
 3 files changed, 49 insertions(+), 4 deletions(-)

diff --git a/dev-libs/openssl/files/openssl-1.1.1p-fix-test-build.patch 
b/dev-libs/openssl/files/openssl-1.1.1p-fix-test-build.patch
new file mode 100644
index 000000000000..f96e54f3127e
--- /dev/null
+++ b/dev-libs/openssl/files/openssl-1.1.1p-fix-test-build.patch
@@ -0,0 +1,46 @@
+https://github.com/openssl/openssl/issues/18619
+https://github.com/openssl/openssl/pull/18634
+https://github.com/openssl/openssl/commit/665ab12ed3f0d78e7cb6a55cdd2b83a2fe150232
+
+From 665ab12ed3f0d78e7cb6a55cdd2b83a2fe150232 Mon Sep 17 00:00:00 2001
+From: Bernd Edlinger <[email protected]>
+Date: Fri, 17 Jun 2022 10:25:24 +0200
+Subject: [PATCH] Fix compile issues in test/v3ext.c with no-rfc3779
+
+There are no ASIdentifiers if OPENSSL_NO_RFC3779 is defined,
+therefore the test cannot be compiled.
+
+Reviewed-by: Matt Caswell <[email protected]>
+Reviewed-by: Tomas Mraz <[email protected]>
+Reviewed-by: Paul Dale <[email protected]>
+(Merged from https://github.com/openssl/openssl/pull/18634)
+
+(cherry picked from commit b76efe61ea9710a8f69e1cb8caf1aeb2ba6f1ebe)
+--- a/test/v3ext.c
++++ b/test/v3ext.c
+@@ -37,6 +37,7 @@ static int test_pathlen(void)
+     return ret;
+ }
+ 
++#ifndef OPENSSL_NO_RFC3779
+ static int test_asid(void)
+ {
+     ASN1_INTEGER *val1 = NULL, *val2 = NULL;
+@@ -113,6 +114,7 @@ static int test_asid(void)
+     ASIdentifiers_free(asid4);
+     return testresult;
+ }
++#endif /* OPENSSL_NO_RFC3779 */
+ 
+ OPT_TEST_DECLARE_USAGE("cert.pem\n")
+ 
+@@ -127,6 +129,8 @@ int setup_tests(void)
+         return 0;
+ 
+     ADD_TEST(test_pathlen);
++#ifndef OPENSSL_NO_RFC3779
+     ADD_TEST(test_asid);
++#endif /* OPENSSL_NO_RFC3779 */
+     return 1;
+ }
+

diff --git a/dev-libs/openssl/openssl-1.1.1p.ebuild 
b/dev-libs/openssl/openssl-1.1.1p.ebuild
index 90f1683c106f..f4af78d2c330 100644
--- a/dev-libs/openssl/openssl-1.1.1p.ebuild
+++ b/dev-libs/openssl/openssl-1.1.1p.ebuild
@@ -1,7 +1,7 @@
 # Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/openssl.org.asc
 inherit edo flag-o-matic toolchain-funcs multilib-minimal verify-sig
@@ -47,6 +47,7 @@ PATCHES=(
        # If they're Gentoo specific, add to USE=-vanilla logic in src_prepare!
        "${FILESDIR}"/${PN}-1.1.0j-parallel_install_fix.patch #671602
        "${FILESDIR}"/${PN}-1.1.1i-riscv32.patch
+       "${FILESDIR}"/${P}-fix-test-build.patch
 )
 
 pkg_setup() {

diff --git a/profiles/package.mask b/profiles/package.mask
index fa6249c522e1..e9663afb0ce2 100644
--- a/profiles/package.mask
+++ b/profiles/package.mask
@@ -46,11 +46,9 @@ gnome-extra/gtkhtml
 
 # Sam James <[email protected]> (2022-06-29)
 # Pre-emptively mask broken upstream versions.
-# 1. openssl 1.1.1o fails tests 
(https://github.com/openssl/openssl/issues/18619)
-# 2. openssl 3.0.4 has a buffer overflow w/ AVX512 
(https://github.com/openssl/openssl/issues/18625)
+# openssl 3.0.4 has a buffer overflow w/ AVX512 
(https://github.com/openssl/openssl/issues/18625)
 # Gentoo isn't vulnerable to the original CVE which caused these releases
 # (CVE-2022-2068) as we have our own rehash script.
-=dev-libs/openssl-1.1.1p
 =dev-libs/openssl-3.0.4
 
 # Piotr Karbowski <[email protected]> (2022-06-26)

Reply via email to