python-texttable: update to 1.3.1
[void-packages.git] / srcpkgs / opensc / patches / patch-src_libopensc_sc-ossl-compat_h.patch
blob1bc84149252e2fae6db16dadee8ddc86bead44a2
1 $OpenBSD: patch-src_libopensc_sc-ossl-compat_h,v 1.3 2018/02/18 14:21:23 sthen Exp $
3 Index: src/libopensc/sc-ossl-compat.h
4 --- src/libopensc/sc-ossl-compat.h.orig
5 +++ src/libopensc/sc-ossl-compat.h
6 @@ -92,12 +92,16 @@ extern "C" {
7 #define RSA_PKCS1_OpenSSL RSA_PKCS1_SSLeay
8 #define OPENSSL_malloc_init CRYPTO_malloc_init
10 +#if !defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x2070000fL
11 #define EVP_PKEY_get0_RSA(x) (x->pkey.rsa)
12 #define EVP_PKEY_get0_DSA(x) (x->pkey.dsa)
13 +#endif
14 #define X509_get_extension_flags(x) (x->ex_flags)
15 #define X509_get_key_usage(x) (x->ex_kusage)
16 #define X509_get_extended_key_usage(x) (x->ex_xkusage)
17 +#if !defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x2070000fL
18 #define EVP_PKEY_up_ref(user_key) CRYPTO_add(&user_key->references, 1, CRYPTO_LOCK_EVP_PKEY)
19 +#endif
20 #if !defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x2050300fL
21 #define X509_up_ref(cert) CRYPTO_add(&cert->references, 1, CRYPTO_LOCK_X509)
22 #endif
23 @@ -110,7 +114,8 @@ extern "C" {
24 * If that is not good enough, versions could be added to libopensc
27 -#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
28 +#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
29 + (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
30 /* based on OpenSSL-1.1.0 e_os2.h */
31 /* sc_ossl_inline: portable inline definition usable in public headers */
32 # if !defined(inline) && !defined(__cplusplus)
33 @@ -127,9 +132,6 @@ extern "C" {
34 # else
35 # define sc_ossl_inline inline
36 # endif
37 -#endif
39 -#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
41 #define RSA_bits(R) (BN_num_bits(R->n))