summaryrefslogtreecommitdiff
path: root/app-crypt/tpm2-tools/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-01-22 20:28:19 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-01-22 20:28:19 +0000
commitabaa75b10f899ada8dd05b23cc03205064394bc6 (patch)
treeeca3dd248b73b92013cba00a0fcc1edf2696e19a /app-crypt/tpm2-tools/files
parent24fd814c326e282c4321965c31f341dad77e270d (diff)
gentoo resync : 22.01.2021
Diffstat (limited to 'app-crypt/tpm2-tools/files')
-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/files/tpm2-tools-5.0-libressl.patch39
3 files changed, 65 insertions, 26 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/files/tpm2-tools-5.0-libressl.patch b/app-crypt/tpm2-tools/files/tpm2-tools-5.0-libressl.patch
new file mode 100644
index 000000000000..b41c9f50e272
--- /dev/null
+++ b/app-crypt/tpm2-tools/files/tpm2-tools-5.0-libressl.patch
@@ -0,0 +1,39 @@
+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 e769d6df..54f124c9 100644
+--- a/lib/tpm2_openssl.c
++++ b/lib/tpm2_openssl.c
+@@ -15,7 +15,7 @@
+ #include "tpm2_systemdeps.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/lib/tpm2_openssl.h b/lib/tpm2_openssl.h
+index 46c8f9c0..71206309 100644
+--- a/lib/tpm2_openssl.h
++++ b/lib/tpm2_openssl.h
+@@ -17,7 +17,7 @@
+ #define LIB_TPM2_OPENSSL_OPENSSL_PRE11
+ #endif
+
+-#if OPENSSL_VERSION_NUMBER >= 0x10101000L
++#if (OPENSSL_VERSION_NUMBER >= 0x10101000L) && !defined(LIBRESSL_VERSION_NUMBER)
+ #define EC_POINT_set_affine_coordinates_tss(group, tpm_pub_key, bn_x, bn_y, dmy) \
+ EC_POINT_set_affine_coordinates(group, tpm_pub_key, bn_x, bn_y, dmy)
+