diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-12-02 22:53:40 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-12-02 22:58:42 -0600 |
commit | 8b399b77b127870b82caddcaa1008d07fcca7ebf (patch) | |
tree | ca3915bb77c012df7a5bee4d3afdb9de9c47b315 /src/_cffi_src/openssl | |
parent | 6d3a07f4fb3094c6868514fcae1cec24c647d2a6 (diff) | |
download | cryptography-8b399b77b127870b82caddcaa1008d07fcca7ebf.tar.gz cryptography-8b399b77b127870b82caddcaa1008d07fcca7ebf.tar.bz2 cryptography-8b399b77b127870b82caddcaa1008d07fcca7ebf.zip |
implement support for encoding name constraints
Diffstat (limited to 'src/_cffi_src/openssl')
-rw-r--r-- | src/_cffi_src/openssl/x509v3.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/_cffi_src/openssl/x509v3.py b/src/_cffi_src/openssl/x509v3.py index 8e163dc2..51c8410a 100644 --- a/src/_cffi_src/openssl/x509v3.py +++ b/src/_cffi_src/openssl/x509v3.py @@ -195,6 +195,7 @@ int i2d_AUTHORITY_KEYID(AUTHORITY_KEYID *, unsigned char **); NAME_CONSTRAINTS *NAME_CONSTRAINTS_new(void); void NAME_CONSTRAINTS_free(NAME_CONSTRAINTS *); +int Cryptography_i2d_NAME_CONSTRAINTS(NAME_CONSTRAINTS *, unsigned char **); OTHERNAME *OTHERNAME_new(void); void OTHERNAME_free(OTHERNAME *); @@ -277,6 +278,8 @@ GENERAL_SUBTREE *sk_GENERAL_SUBTREE_value( int sk_GENERAL_SUBTREE_push(Cryptography_STACK_OF_GENERAL_SUBTREE *, GENERAL_SUBTREE *); +GENERAL_SUBTREE *GENERAL_SUBTREE_new(void); + void sk_ASN1_INTEGER_free(Cryptography_STACK_OF_ASN1_INTEGER *); int sk_ASN1_INTEGER_num(Cryptography_STACK_OF_ASN1_INTEGER *); ASN1_INTEGER *sk_ASN1_INTEGER_value(Cryptography_STACK_OF_ASN1_INTEGER *, int); @@ -295,4 +298,13 @@ int i2d_CRL_DIST_POINTS(Cryptography_STACK_OF_DIST_POINT *, unsigned char **); """ CUSTOMIZATIONS = """ +/* i2d_NAME_CONSTRAINTS doesn't exist, but this is the way the macros in + asn1t.h would implement it. We're not using those macros in case + OpenSSL exposes this function in the future. */ +int Cryptography_i2d_NAME_CONSTRAINTS(NAME_CONSTRAINTS *nc, + unsigned char **out) { + return ASN1_item_i2d((ASN1_VALUE *)nc, out, + ASN1_ITEM_rptr(NAME_CONSTRAINTS)); +} + """ |