commit:     9fa3fb2c429652631b76f18ee3feec3b9c068b04
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 15 19:29:53 2021 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Mon Nov 15 19:29:53 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9fa3fb2c

sys-auth/yubico-piv-tool-2.2.1: support openssl-3.0

Backported upstream fix, i.e. should no longer be needed come next
release.

Closes: https://bugs.gentoo.org/805914
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 .../files/yubico-piv-tool-2.2.1-openssl3.patch     | 32 ++++++++++++++++++++++
 .../yubico-piv-tool/yubico-piv-tool-2.2.1.ebuild   |  1 +
 2 files changed, 33 insertions(+)

diff --git 
a/sys-auth/yubico-piv-tool/files/yubico-piv-tool-2.2.1-openssl3.patch 
b/sys-auth/yubico-piv-tool/files/yubico-piv-tool-2.2.1-openssl3.patch
new file mode 100644
index 000000000000..5ba807ea0c6c
--- /dev/null
+++ b/sys-auth/yubico-piv-tool/files/yubico-piv-tool-2.2.1-openssl3.patch
@@ -0,0 +1,32 @@
+From 81b063f53db8a3d74077522a6ff4f1640cc3fe70 Mon Sep 17 00:00:00 2001
+From: Clemens Lang <[email protected]>
+Date: Sun, 14 Nov 2021 18:21:28 +0100
+Subject: [PATCH] Avoid header include guard conflict with OpenSSL 3
+
+OpenSSL 3.x ships an openssl/types.h header that's protected with an
+OPENSSL_TYPES_H include guard macro. OpenSSL's headers fail to parse
+when ykcs11/openssl_types.h defines this symbol.
+
+Switch the include guard for the file to YKCS11_OPENSSL_TYPES_H to
+prevent this from happening.
+
+Signed-off-by: Clemens Lang <[email protected]>
+---
+ ykcs11/openssl_types.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/ykcs11/openssl_types.h b/ykcs11/openssl_types.h
+index c526d815..f3e1a7c0 100644
+--- a/ykcs11/openssl_types.h
++++ b/ykcs11/openssl_types.h
+@@ -28,8 +28,8 @@
+  *
+  */
+ 
+-#ifndef OPENSSL_TYPES_H
+-#define OPENSSL_TYPES_H
++#ifndef YKCS11_OPENSSL_TYPES_H
++#define YKCS11_OPENSSL_TYPES_H
+ 
+ #include <openssl/bn.h>
+ #include <openssl/x509.h>

diff --git a/sys-auth/yubico-piv-tool/yubico-piv-tool-2.2.1.ebuild 
b/sys-auth/yubico-piv-tool/yubico-piv-tool-2.2.1.ebuild
index 8cea2321eafe..a8415ba3ce87 100644
--- a/sys-auth/yubico-piv-tool/yubico-piv-tool-2.2.1.ebuild
+++ b/sys-auth/yubico-piv-tool/yubico-piv-tool-2.2.1.ebuild
@@ -28,6 +28,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-2.1.1-no-Werror.patch
        "${FILESDIR}"/${PN}-2.1.1-tests-optional.patch
        "${FILESDIR}"/${PN}-2.1.1-ykcs11-threads.patch
+       "${FILESDIR}"/${PN}-2.2.1-openssl3.patch
 )
 
 S="${WORKDIR}/${PN}-${P}"

Reply via email to