Skip to content

Commit

Permalink
Backport x509_up_ref (#4029)
Browse files Browse the repository at this point in the history
* pytest 3.3.0 has an issue with parametrized null bytes again (#4026)

* add X509_up_ref (#4028)
  • Loading branch information
reaperhulk authored and alex committed Nov 29, 2017
1 parent 2219ea7 commit e85fcee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions src/_cffi_src/openssl/x509.py
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit e85fcee

Please sign in to comment.