diff --git a/setup.py b/setup.py index 82c4bf5bb031..c79106f19498 100644 --- a/setup.py +++ b/setup.py @@ -45,7 +45,7 @@ setup_requirements.append("cffi>=1.7") test_requirements = [ - "pytest>=3.2.1", + "pytest>=3.2.1,!=3.3.0", "pretend", "iso8601", "pytz", diff --git a/src/_cffi_src/openssl/x509.py b/src/_cffi_src/openssl/x509.py index e7619dd6038f..394c37c5e88c 100644 --- a/src/_cffi_src/openssl/x509.py +++ b/src/_cffi_src/openssl/x509.py @@ -83,6 +83,7 @@ void X509_free(X509 *); X509 *X509_dup(X509 *); int X509_cmp(const X509 *, const X509 *); +int X509_up_ref(X509 *); int X509_print_ex(BIO *, X509 *, unsigned long, unsigned long); @@ -382,6 +383,10 @@ opaquing. */ #if CRYPTOGRAPHY_OPENSSL_LESS_THAN_110 +int X509_up_ref(X509 *x) { + return CRYPTO_add(&x->references, 1, CRYPTO_LOCK_X509); +} + const X509_ALGOR *X509_get0_tbs_sigalg(const X509 *x) { return x->cert_info->signature;