summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSalah Coronya <salah.coronya@gmail.com>2020-12-30 16:26:43 -0600
committerJoonas Niilola <juippis@gentoo.org>2021-01-20 16:13:40 +0200
commit2c12e051f16f72eba50104d04527567e7a541591 (patch)
tree198876f8e9c63fa95dde8ab5c4b59b61060e0d7e /app-crypt/tpm2-tools
parentapp-crypt/tpm2-tools: Don't let configure run git, add missing dep (diff)
downloadgentoo-2c12e051f16f72eba50104d04527567e7a541591.tar.gz
gentoo-2c12e051f16f72eba50104d04527567e7a541591.tar.bz2
gentoo-2c12e051f16f72eba50104d04527567e7a541591.zip
app-crypt/tpm2-tools: Fix libressl support
Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Salah Coronya <salah.coronya@gmail.com> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'app-crypt/tpm2-tools')
-rw-r--r--app-crypt/tpm2-tools/files/tpm2-tools-4.2.1-libressl.patch26
-rw-r--r--app-crypt/tpm2-tools/files/tpm2-tools-4.3.0-libressl.patch26
-rw-r--r--app-crypt/tpm2-tools/tpm2-tools-4.3.0-r1.ebuild2
3 files changed, 27 insertions, 27 deletions
diff --git a/app-crypt/tpm2-tools/files/tpm2-tools-4.2.1-libressl.patch b/app-crypt/tpm2-tools/files/tpm2-tools-4.2.1-libressl.patch
deleted file mode 100644
index 2f39db3283c3..000000000000
--- a/app-crypt/tpm2-tools/files/tpm2-tools-4.2.1-libressl.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From a1ac2ee0c6592e6f730458c03a2abd1532c66046 Mon Sep 17 00:00:00 2001
-From: Salah Coronya <salah.coronya@gmail.com>
-Date: Sun, 12 Jan 2020 19:17:48 -0600
-Subject: [PATCH] lib/tpm2_openssl.c: Fix build for libressl
-
-Signed-off-by: Salah Coronya <salah.coronya@gmail.com>
----
- lib/tpm2_openssl.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/tpm2_openssl.c b/lib/tpm2_openssl.c
-index 505dd7a0..fd3861d9 100644
---- a/lib/tpm2_openssl.c
-+++ b/lib/tpm2_openssl.c
-@@ -14,7 +14,7 @@
- #include "tpm2_openssl.h"
-
- /* compatibility function for OpenSSL versions < 1.1.0 */
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- static int BN_bn2binpad(const BIGNUM *a, unsigned char *to, int tolen) {
- int r;
- int topad;
---
-2.24.1
-
diff --git a/app-crypt/tpm2-tools/files/tpm2-tools-4.3.0-libressl.patch b/app-crypt/tpm2-tools/files/tpm2-tools-4.3.0-libressl.patch
new file mode 100644
index 000000000000..88948546353f
--- /dev/null
+++ b/app-crypt/tpm2-tools/files/tpm2-tools-4.3.0-libressl.patch
@@ -0,0 +1,26 @@
+diff --git a/lib/tpm2_identity_util.c b/lib/tpm2_identity_util.c
+index a3b0e387..9519ca7b 100644
+--- a/lib/tpm2_identity_util.c
++++ b/lib/tpm2_identity_util.c
+@@ -17,7 +17,7 @@
+
+ // Identity-related functionality that the TPM normally does, but using OpenSSL
+
+-#if defined(LIBRESSL_VERSION_NUMBER)
++#if 0
+ static int RSA_padding_add_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
+ const unsigned char *from, int flen, const unsigned char *param, int plen,
+ const EVP_MD *md, const EVP_MD *mgf1md) {
+diff --git a/lib/tpm2_openssl.c b/lib/tpm2_openssl.c
+index 6d29c0d4..bd375ce3 100644
+--- a/lib/tpm2_openssl.c
++++ b/lib/tpm2_openssl.c
+@@ -14,7 +14,7 @@
+ #include "tpm2_openssl.h"
+
+ /* compatibility function for OpenSSL versions < 1.1.0 */
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ static int BN_bn2binpad(const BIGNUM *a, unsigned char *to, int tolen) {
+ int r;
+ int topad;
diff --git a/app-crypt/tpm2-tools/tpm2-tools-4.3.0-r1.ebuild b/app-crypt/tpm2-tools/tpm2-tools-4.3.0-r1.ebuild
index a3d0239561ca..f9edff247c56 100644
--- a/app-crypt/tpm2-tools/tpm2-tools-4.3.0-r1.ebuild
+++ b/app-crypt/tpm2-tools/tpm2-tools-4.3.0-r1.ebuild
@@ -27,7 +27,7 @@ DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig
sys-devel/autoconf-archive"
PATCHES=(
- "${FILESDIR}/${PN}-4.2.1-libressl.patch"
+ "${FILESDIR}/${PN}-4.3.0-libressl.patch"
"${FILESDIR}/${PN}-4.3.0-Remove-WError.patch"
)