aboutsummaryrefslogtreecommitdiffstats
path: root/community/opensc
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-04-05 08:25:04 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-04-06 05:19:27 +0000
commitfc48fe8a2149f69fafb3872a6d1db5310f73d26a (patch)
tree63765dbf691ffb135a1a83800007e794f7ec3f0f /community/opensc
parentd6131c38042eed3e2cbfde9f348d99a47301e509 (diff)
downloadaports-fc48fe8a2149f69fafb3872a6d1db5310f73d26a.tar.bz2
aports-fc48fe8a2149f69fafb3872a6d1db5310f73d26a.tar.xz
community/opensc: rebuild against libressl-2.7
Diffstat (limited to 'community/opensc')
-rw-r--r--community/opensc/APKBUILD2
-rw-r--r--community/opensc/libressl-2.7.patch39
2 files changed, 40 insertions, 1 deletions
diff --git a/community/opensc/APKBUILD b/community/opensc/APKBUILD
index a03ec4045c..4345460bc8 100644
--- a/community/opensc/APKBUILD
+++ b/community/opensc/APKBUILD
@@ -3,7 +3,7 @@
pkgname=opensc
_realname=OpenSC
pkgver=0.17.0
-pkgrel=1
+pkgrel=2
pkgdesc="Open source smart card tools and middleware"
url="https://github.com/OpenSC/OpenSC"
arch="all"
diff --git a/community/opensc/libressl-2.7.patch b/community/opensc/libressl-2.7.patch
new file mode 100644
index 0000000000..3904bd2c13
--- /dev/null
+++ b/community/opensc/libressl-2.7.patch
@@ -0,0 +1,39 @@
+diff --git a/src/libopensc/sc-ossl-compat.h b/src/libopensc/sc-ossl-compat.h
+index 2c853be..0a4e1c7 100644
+--- a/src/libopensc/sc-ossl-compat.h
++++ b/src/libopensc/sc-ossl-compat.h
+@@ -92,12 +92,14 @@ extern "C" {
+ #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)
++#if !defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x2070000fL
++#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
+ #if !defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x2050300fL
+ #define X509_up_ref(cert) CRYPTO_add(&cert->references, 1, CRYPTO_LOCK_X509)
+ #endif
+@@ -129,7 +131,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 < 0x2070000fL)
+
+ #define RSA_bits(R) (BN_num_bits(R->n))
+
+@@ -217,7 +219,7 @@ static sc_ossl_inline void RSA_get0_crt_params(const RSA *r,
+
+ #endif /* OPENSSL_NO_RSA */
+
+-#ifndef OPENSSL_NO_DSA
++#if !defined(OPENSSL_NO_DSA) && !(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x2070000fL)
+ static sc_ossl_inline void DSA_get0_pqg(const DSA *d, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g)
+ {
+ if (p != NULL)