summaryrefslogtreecommitdiff
path: root/app-crypt/tpm2-tools/files/tpm2-tools-4.3.0-libressl.patch
diff options
context:
space:
mode:
Diffstat (limited to 'app-crypt/tpm2-tools/files/tpm2-tools-4.3.0-libressl.patch')
-rw-r--r--app-crypt/tpm2-tools/files/tpm2-tools-4.3.0-libressl.patch26
1 files changed, 26 insertions, 0 deletions
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;