commit:     c7792db235647a6441b315528997b40ba2beeaaa
Author:     Stefan Strogin <steils <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 24 09:27:13 2020 +0000
Commit:     Stefan Strogin <steils <AT> gentoo <DOT> org>
CommitDate: Tue Nov 24 10:38:49 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7792db2

app-crypt/trousers: add patch for LibreSSL

Package-Manager: Portage-3.0.10, Repoman-3.0.2
Signed-off-by: Stefan Strogin <steils <AT> gentoo.org>

 .../trousers/files/trousers-0.3.15-libressl.patch  | 31 ++++++++++++++++++++++
 app-crypt/trousers/trousers-0.3.15.ebuild          |  1 +
 2 files changed, 32 insertions(+)

diff --git a/app-crypt/trousers/files/trousers-0.3.15-libressl.patch 
b/app-crypt/trousers/files/trousers-0.3.15-libressl.patch
new file mode 100644
index 00000000000..e4aee00d8d9
--- /dev/null
+++ b/app-crypt/trousers/files/trousers-0.3.15-libressl.patch
@@ -0,0 +1,31 @@
+From 88e90ee4c36f0decdf7c15e271bccb8b0809a21a Mon Sep 17 00:00:00 2001
+From: Stefan Strogin <ste...@steils.org>
+Date: Tue, 24 Nov 2020 11:08:13 +0200
+Subject: [PATCH] trousers: do not re-declare RSA_set0_key with LibreSSL
+
+The method RSA_set0_key is provided by LibreSSL since 2.7.0, that means
+in all currently supported versions.
+
+Upstream-Status: Submitted
+[https://sourceforge.net/p/trousers/trousers/merge-requests/2/]
+Signed-off-by: Stefan Strogin <ste...@steils.org>
+---
+ src/trspi/crypto/openssl/rsa.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/trspi/crypto/openssl/rsa.c b/src/trspi/crypto/openssl/rsa.c
+index 24f13e7..cf46c08 100644
+--- a/src/trspi/crypto/openssl/rsa.c
++++ b/src/trspi/crypto/openssl/rsa.c
+@@ -38,7 +38,7 @@
+ #define DEBUG_print_openssl_errors()
+ #endif
+ 
+-#if (OPENSSL_VERSION_NUMBER < 0x10100001L) || defined(LIBRESSL_VERSION_NUMBER)
++#if (OPENSSL_VERSION_NUMBER < 0x10100001L)
+ static int
+ RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d)
+ {
+-- 
+2.29.2
+

diff --git a/app-crypt/trousers/trousers-0.3.15.ebuild 
b/app-crypt/trousers/trousers-0.3.15.ebuild
index 94a40dd74e3..041250710cb 100644
--- a/app-crypt/trousers/trousers-0.3.15.ebuild
+++ b/app-crypt/trousers/trousers-0.3.15.ebuild
@@ -29,6 +29,7 @@ BDEPEND="virtual/pkgconfig"
 PATCHES=(
        "${FILESDIR}/${PN}-0.3.13-nouseradd.patch"
        "${FILESDIR}/${PN}-0.3.14-Makefile.am-Mark-tddl.a-nodist.patch"
+       "${FILESDIR}/${P}-libressl.patch"
 )
 
 DOCS="AUTHORS ChangeLog NICETOHAVES README TODO"

Reply via email to