aboutsummaryrefslogtreecommitdiffstats
path: root/src/_cffi_src/openssl
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2015-12-25 17:31:26 -0500
committerAlex Gaynor <alex.gaynor@gmail.com>2015-12-25 17:31:26 -0500
commitbaacf1a8ca88a3873d7c4cc3055b1e4564c879c4 (patch)
treef7ae6a68cb98f27b1d8b53f6866843ab229c359c /src/_cffi_src/openssl
parentcad8ae268c5009c989b765021404ff8c86df1d8b (diff)
parent14553ac531c21531c9ac2eaa13f52ce7a978120d (diff)
downloadcryptography-baacf1a8ca88a3873d7c4cc3055b1e4564c879c4.tar.gz
cryptography-baacf1a8ca88a3873d7c4cc3055b1e4564c879c4.tar.bz2
cryptography-baacf1a8ca88a3873d7c4cc3055b1e4564c879c4.zip
Merge pull request #2572 from reaperhulk/crlbuilder-add-revoked-certificate
support revoked certificates in CertificateRevocationListBuilder
Diffstat (limited to 'src/_cffi_src/openssl')
-rw-r--r--src/_cffi_src/openssl/x509.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/_cffi_src/openssl/x509.py b/src/_cffi_src/openssl/x509.py
index b58a1a27..c5eb600a 100644
--- a/src/_cffi_src/openssl/x509.py
+++ b/src/_cffi_src/openssl/x509.py
@@ -270,6 +270,8 @@ void PKCS8_PRIV_KEY_INFO_free(PKCS8_PRIV_KEY_INFO *);
"""
MACROS = """
+X509_REVOKED *Cryptography_X509_REVOKED_dup(X509_REVOKED *);
+
int i2d_X509_CINF(X509_CINF *, unsigned char **);
int i2d_X509_CRL_INFO(X509_CRL_INFO *, unsigned char **);
int i2d_X509_REQ_INFO(X509_REQ_INFO *, unsigned char **);
@@ -365,4 +367,12 @@ int (*i2d_ECPrivateKey_bio)(BIO *, EC_KEY *) = NULL;
EC_KEY *(*o2i_ECPublicKey)(EC_KEY **, const unsigned char **, long) = NULL;
int (*i2o_ECPublicKey)(EC_KEY *, unsigned char **) = NULL;
#endif
+
+/* X509_REVOKED_dup only exists on 1.0.2+. It is implemented using
+ IMPLEMENT_ASN1_DUP_FUNCTION. The below is the equivalent so we have
+ it available on all OpenSSLs. */
+X509_REVOKED *Cryptography_X509_REVOKED_dup(X509_REVOKED *rev) {
+ return ASN1_item_dup(ASN1_ITEM_rptr(X509_REVOKED), rev);
+}
+
"""