diff options
author | Erik Trauschke <erik.trauschke@gmail.com> | 2015-10-20 08:18:00 -0700 |
---|---|---|
committer | Erik Trauschke <erik.trauschke@gmail.com> | 2015-10-20 08:18:00 -0700 |
commit | c8ab2ea92fe43d1ff64d7463c61fa9ef34cce7d8 (patch) | |
tree | d3ed0f8b77f4f978ee847585e5b1ae1a9994270b /src/_cffi_src/openssl | |
parent | c219b962f8f02f85edf2a3452fe4136b1211f807 (diff) | |
parent | 018a9659924c5ffe548d716295a4292c6929c341 (diff) | |
download | cryptography-c8ab2ea92fe43d1ff64d7463c61fa9ef34cce7d8.tar.gz cryptography-c8ab2ea92fe43d1ff64d7463c61fa9ef34cce7d8.tar.bz2 cryptography-c8ab2ea92fe43d1ff64d7463c61fa9ef34cce7d8.zip |
Merge branch 'master' into crl_ossl_backend
Diffstat (limited to 'src/_cffi_src/openssl')
-rw-r--r-- | src/_cffi_src/openssl/pkcs7.py | 30 | ||||
-rw-r--r-- | src/_cffi_src/openssl/x509v3.py | 2 |
2 files changed, 32 insertions, 0 deletions
diff --git a/src/_cffi_src/openssl/pkcs7.py b/src/_cffi_src/openssl/pkcs7.py index 5d6ee45f..0dd89582 100644 --- a/src/_cffi_src/openssl/pkcs7.py +++ b/src/_cffi_src/openssl/pkcs7.py @@ -10,7 +10,33 @@ INCLUDES = """ TYPES = """ typedef struct { + Cryptography_STACK_OF_X509 *cert; + Cryptography_STACK_OF_X509_CRL *crl; + ...; +} PKCS7_SIGNED; + +typedef struct { + Cryptography_STACK_OF_X509 *cert; + Cryptography_STACK_OF_X509_CRL *crl; + ...; +} PKCS7_SIGN_ENVELOPE; + +typedef ... PKCS7_DIGEST; +typedef ... PKCS7_ENCRYPT; +typedef ... PKCS7_ENVELOPE; + +typedef struct { ASN1_OBJECT *type; + union { + char *ptr; + ASN1_OCTET_STRING *data; + PKCS7_SIGNED *sign; + PKCS7_ENVELOPE *enveloped; + PKCS7_SIGN_ENVELOPE *signed_and_enveloped; + PKCS7_DIGEST *digest; + PKCS7_ENCRYPT *encrypted; + ASN1_TYPE *other; + } d; ...; } PKCS7; @@ -44,13 +70,17 @@ Cryptography_STACK_OF_X509 *PKCS7_get0_signers(PKCS7 *, PKCS7 *PKCS7_encrypt(Cryptography_STACK_OF_X509 *, BIO *, const EVP_CIPHER *, int); int PKCS7_decrypt(PKCS7 *, EVP_PKEY *, X509 *, BIO *, int); + +BIO *PKCS7_dataInit(PKCS7 *, BIO *); """ MACROS = """ +int PKCS7_type_is_encrypted(PKCS7 *); int PKCS7_type_is_signed(PKCS7 *); int PKCS7_type_is_enveloped(PKCS7 *); int PKCS7_type_is_signedAndEnveloped(PKCS7 *); int PKCS7_type_is_data(PKCS7 *); +int PKCS7_type_is_digest(PKCS7 *); """ CUSTOMIZATIONS = "" diff --git a/src/_cffi_src/openssl/x509v3.py b/src/_cffi_src/openssl/x509v3.py index 51cac62b..22406c40 100644 --- a/src/_cffi_src/openssl/x509v3.py +++ b/src/_cffi_src/openssl/x509v3.py @@ -202,6 +202,8 @@ void OTHERNAME_free(OTHERNAME *); void *X509V3_set_ctx_nodb(X509V3_CTX *); int i2d_GENERAL_NAMES(GENERAL_NAMES *, unsigned char **); +GENERAL_NAMES *d2i_GENERAL_NAMES(GENERAL_NAMES **, const unsigned char **, + long); int i2d_EXTENDED_KEY_USAGE(EXTENDED_KEY_USAGE *, unsigned char **); |