diff options
Diffstat (limited to 'dev-libs/opensc/files/opensc-0.18.0-libressl.patch')
-rw-r--r-- | dev-libs/opensc/files/opensc-0.18.0-libressl.patch | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/dev-libs/opensc/files/opensc-0.18.0-libressl.patch b/dev-libs/opensc/files/opensc-0.18.0-libressl.patch deleted file mode 100644 index f6f3d772e071..000000000000 --- a/dev-libs/opensc/files/opensc-0.18.0-libressl.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 226cd96bfd384a40b3ab6b6dafb97f6e399524f4 Mon Sep 17 00:00:00 2001 -From: Alon Bar-Lev <alon.barlev@gmail.com> -Date: Fri, 22 Jun 2018 22:21:03 +0300 -Subject: [PATCH] build: support >=libressl-2.7 - -https://github.com/OpenSC/OpenSC/pull/1406 - ---- - src/libopensc/sc-ossl-compat.h | 19 +++++++++++++------ - src/tools/sc-hsm-tool.c | 2 +- - 2 files changed, 14 insertions(+), 7 deletions(-) - -diff --git a/src/libopensc/sc-ossl-compat.h b/src/libopensc/sc-ossl-compat.h -index a94d9564..d9e087a3 100644 ---- a/src/libopensc/sc-ossl-compat.h -+++ b/src/libopensc/sc-ossl-compat.h -@@ -90,17 +90,24 @@ extern "C" { - - #if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) - #define RSA_PKCS1_OpenSSL RSA_PKCS1_SSLeay --#define OPENSSL_malloc_init CRYPTO_malloc_init - --#define EVP_PKEY_get0_RSA(x) (x->pkey.rsa) --#define EVP_PKEY_get0_DSA(x) (x->pkey.dsa) - #define X509_get_extension_flags(x) (x->ex_flags) - #define X509_get_key_usage(x) (x->ex_kusage) - #define X509_get_extended_key_usage(x) (x->ex_xkusage) --#define EVP_PKEY_up_ref(user_key) CRYPTO_add(&user_key->references, 1, CRYPTO_LOCK_EVP_PKEY) - #if !defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x2050300fL - #define X509_up_ref(cert) CRYPTO_add(&cert->references, 1, CRYPTO_LOCK_X509) - #endif -+#if !defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x20700000L -+#define OPENSSL_malloc_init CRYPTO_malloc_init -+#define EVP_PKEY_get0_RSA(x) (x->pkey.rsa) -+#define EVP_PKEY_get0_DSA(x) (x->pkey.dsa) -+#define EVP_PKEY_up_ref(user_key) CRYPTO_add(&user_key->references, 1, CRYPTO_LOCK_EVP_PKEY) -+#endif -+#endif -+ -+/* workaround unused value warning for a macro that does nothing */ -+#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x20700000L -+#define OPENSSL_malloc_init() - #endif - - /* -@@ -110,7 +117,7 @@ extern "C" { - * If that is not good enough, versions could be added to libopensc - */ - --#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) - /* based on OpenSSL-1.1.0 e_os2.h */ - /* sc_ossl_inline: portable inline definition usable in public headers */ - # if !defined(inline) && !defined(__cplusplus) -@@ -129,7 +136,7 @@ extern "C" { - # endif - #endif - --#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2050300fL) - - #define RSA_bits(R) (BN_num_bits(R->n)) - -diff --git a/src/tools/sc-hsm-tool.c b/src/tools/sc-hsm-tool.c -index 823eb217..307bad25 100644 ---- a/src/tools/sc-hsm-tool.c -+++ b/src/tools/sc-hsm-tool.c -@@ -1761,7 +1761,7 @@ int main(int argc, char *argv[]) - } - } - --#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !(defined LIBRESSL_VERSION_NUMBER) -+#if OPENSSL_VERSION_NUMBER >= 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x20700000L) - OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS - | OPENSSL_INIT_ADD_ALL_CIPHERS - | OPENSSL_INIT_ADD_ALL_DIGESTS, --- -2.16.4 - |