aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-crypt/qca/files/qca-2.2.0-libressl.patch')
-rw-r--r--app-crypt/qca/files/qca-2.2.0-libressl.patch115
1 files changed, 0 insertions, 115 deletions
diff --git a/app-crypt/qca/files/qca-2.2.0-libressl.patch b/app-crypt/qca/files/qca-2.2.0-libressl.patch
deleted file mode 100644
index f4c2f01..0000000
--- a/app-crypt/qca/files/qca-2.2.0-libressl.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From bfc0dd038fea35f004867867935eb695b958f849 Mon Sep 17 00:00:00 2001
-From: Stefan Strogin <stefan.strogin@gmail.com>
-Date: Fri, 5 Apr 2019 09:17:23 +0300
-Subject: [PATCH] Fix build with LibreSSL
-
-Provide RSA_meth_set_{sign,verify} for LibreSSL.
-Do not redefine M_ASN1_IA5STRING_new and RSA_F_RSA_EAY_PRIVATE_DECRYPT.
-Disable HKDF.
-
-Upstream-Status: Submitted [https://phabricator.kde.org/D20259]
-Signed-off-by: Stefan Strogin <stefan.strogin@gmail.com>
----
- plugins/qca-ossl/ossl110-compat.h | 34 ++++++++++++++++---------------
- plugins/qca-ossl/qca-ossl.cpp | 10 ++++-----
- 2 files changed, 23 insertions(+), 21 deletions(-)
-
-diff --git a/plugins/qca-ossl/ossl110-compat.h b/plugins/qca-ossl/ossl110-compat.h
-index b320707..d093e50 100644
---- a/plugins/qca-ossl/ossl110-compat.h
-+++ b/plugins/qca-ossl/ossl110-compat.h
-@@ -205,22 +205,6 @@ static int RSA_meth_set_priv_dec(RSA_METHOD *rsa, int (*priv_dec) (int flen, con
- return 1;
- }
-
--static int RSA_meth_set_sign(RSA_METHOD *meth, int (*sign) (int type, const unsigned char *m,
-- unsigned int m_length, unsigned char *sigret, unsigned int *siglen, const RSA *rsa))
--{
-- if (!meth) return 0;
-- meth->rsa_sign = sign;
-- return 1;
--}
--
--static int RSA_meth_set_verify(RSA_METHOD *meth, int (*verify) (int dtype, const unsigned char *m,
-- unsigned int m_length, const unsigned char *sigbuf, unsigned int siglen, const RSA *rsa))
--{
-- if (!meth) return 0;
-- meth->rsa_verify = verify;
-- return 1;
--}
--
- static int RSA_meth_set_finish(RSA_METHOD *meth, int (*finish) (RSA *rsa))
- {
- if (!meth) return 0;
-@@ -272,4 +256,22 @@ static void HMAC_CTX_free(HMAC_CTX *ctx)
-
- #endif // OPENSSL_VERSION_NUMBER < 0x10100000L
-
-+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
-+static int RSA_meth_set_sign(RSA_METHOD *meth, int (*sign) (int type, const unsigned char *m,
-+ unsigned int m_length, unsigned char *sigret, unsigned int *siglen, const RSA *rsa))
-+{
-+ if (!meth) return 0;
-+ meth->rsa_sign = sign;
-+ return 1;
-+}
-+
-+static int RSA_meth_set_verify(RSA_METHOD *meth, int (*verify) (int dtype, const unsigned char *m,
-+ unsigned int m_length, const unsigned char *sigbuf, unsigned int siglen, const RSA *rsa))
-+{
-+ if (!meth) return 0;
-+ meth->rsa_verify = verify;
-+ return 1;
-+}
-+#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
-+
- #endif // OSSL110COMPAT_H
-diff --git a/plugins/qca-ossl/qca-ossl.cpp b/plugins/qca-ossl/qca-ossl.cpp
-index 11ecdc9..75c48fc 100644
---- a/plugins/qca-ossl/qca-ossl.cpp
-+++ b/plugins/qca-ossl/qca-ossl.cpp
-@@ -62,12 +62,12 @@
- #endif
-
- // OpenSSL 1.1.0 compatibility macros
--#ifdef OSSL_110
-+#if defined(OSSL_110) && !defined(LIBRESSL_VERSION_NUMBER)
- #define M_ASN1_IA5STRING_new() ASN1_IA5STRING_new()
- #define RSA_F_RSA_EAY_PRIVATE_DECRYPT RSA_F_RSA_OSSL_PRIVATE_DECRYPT
- #endif
-
--#ifdef OSSL_110
-+#if defined(OSSL_110) && !defined(LIBRESSL_VERSION_NUMBER)
- #include <openssl/kdf.h>
- #endif
-
-@@ -1280,7 +1280,7 @@ public:
- protected:
- };
-
--#ifdef OSSL_110
-+#if defined(OSSL_110) && !defined(LIBRESSL_VERSION_NUMBER)
- class opensslHkdfContext : public HKDFContext
- {
- public:
-@@ -7416,7 +7416,7 @@ public:
- #endif
- list += "pbkdf1(sha1)";
- list += "pbkdf2(sha1)";
--#ifdef OSSL_110
-+#if defined(OSSL_110) && !defined(LIBRESSL_VERSION_NUMBER)
- list += "hkdf(sha256)";
- #endif
- list += "pkey";
-@@ -7489,7 +7489,7 @@ public:
- #endif
- else if ( type == "pbkdf2(sha1)" )
- return new opensslPbkdf2Context( this, type );
--#ifdef OSSL_110
-+#if defined(OSSL_110) && !defined(LIBRESSL_VERSION_NUMBER)
- else if ( type == "hkdf(sha256)" )
- return new opensslHkdfContext( this, type );
- #endif
---
-2.21.0
-