diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2016-03-08 21:21:09 -0400 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2016-03-08 21:21:09 -0400 |
commit | 3b3b4938ca31a17cf3ac8cb72e0e8ae0c111ff15 (patch) | |
tree | 93c3e6a012ffa5a1dac5f7f2f4da47f17e1f282d /src | |
parent | 87a76094d85b133e829366a2f8de96462a3037ec (diff) | |
download | cryptography-3b3b4938ca31a17cf3ac8cb72e0e8ae0c111ff15.tar.gz cryptography-3b3b4938ca31a17cf3ac8cb72e0e8ae0c111ff15.tar.bz2 cryptography-3b3b4938ca31a17cf3ac8cb72e0e8ae0c111ff15.zip |
handle removal of M_ASN1_TIME_dup
OpenSSL 1.1.0 compat work
Diffstat (limited to 'src')
-rw-r--r-- | src/_cffi_src/openssl/asn1.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/_cffi_src/openssl/asn1.py b/src/_cffi_src/openssl/asn1.py index 30bd2451..95bb0f2e 100644 --- a/src/_cffi_src/openssl/asn1.py +++ b/src/_cffi_src/openssl/asn1.py @@ -155,4 +155,11 @@ ASN1_TYPE *d2i_ASN1_TYPE(ASN1_TYPE **, const unsigned char **, long); """ CUSTOMIZATIONS = """ +/* This macro is removed in 1.1.0. We re-add it if required to support + pyOpenSSL versions older than whatever resolves + https://github.com/pyca/pyopenssl/issues/431 */ +#if !defined(M_ASN1_TIME_dup) +#define M_ASN1_TIME_dup(a) (ASN1_TIME *)\ + ASN1_STRING_dup((const ASN1_STRING *)a) +#endif """ |