d43abc6d66666c3553afa600158d5088bf7dcab5
[feed/packages.git] /
1 From 98bf3eda9c950158cf6a0a6a698dd365712201b1 Mon Sep 17 00:00:00 2001
2 From: Rosen Penev <rosenp@gmail.com>
3 Date: Mon, 25 Nov 2019 12:06:16 -0800
4 Subject: [PATCH 6/7] Add X509_STORE_CTX_trusted_stack compatibility macro
5
6 Deprecated in 1.1
7
8 Signed-off-by: Rosen Penev <rosenp@gmail.com>
9 ---
10 src/_cffi_src/openssl/x509_vfy.py | 12 +++++++++++-
11 1 file changed, 11 insertions(+), 1 deletion(-)
12
13 --- a/src/_cffi_src/openssl/x509_vfy.py
14 +++ b/src/_cffi_src/openssl/x509_vfy.py
15 @@ -265,4 +265,10 @@ static const long Cryptography_HAS_X509_
16 #else
17 static const long Cryptography_HAS_X509_CB_ISSUER_CHECK = 1;
18 #endif
19 +
20 +#if (OPENSSL_API_COMPAT >= 0x10100000L) && !CRYPTOGRAPHY_IS_LIBRESSL
21 +#define X509_STORE_CTX_trusted_stack X509_STORE_CTX_set0_trusted_stack
22 +#define X509_STORE_CTX_set_chain X509_STORE_CTX_set0_untrusted
23 +#define X509_STORE_CTX_get_chain X509_STORE_CTX_get1_chain
24 +#endif
25 """