aboutsummaryrefslogtreecommitdiffstats
path: root/src/_cffi_src
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2015-12-07 21:44:30 -0500
committerAlex Gaynor <alex.gaynor@gmail.com>2015-12-07 21:44:30 -0500
commit26c776f71d0f548fdfc9122517923268d740d3af (patch)
treee6f69805f7ee0f5aa5ef7ddc88a8c32709c3854d /src/_cffi_src
parente36da1754dc04225f22db46c5b06602db377b429 (diff)
parent3fd2f7ac71ecdf26c7f85d8bce21714949e6933b (diff)
downloadcryptography-26c776f71d0f548fdfc9122517923268d740d3af.tar.gz
cryptography-26c776f71d0f548fdfc9122517923268d740d3af.tar.bz2
cryptography-26c776f71d0f548fdfc9122517923268d740d3af.zip
Merge branch 'master' into pypy-4.0.1
Diffstat (limited to 'src/_cffi_src')
-rw-r--r--src/_cffi_src/openssl/x509.py4
-rw-r--r--src/_cffi_src/openssl/x509v3.py12
2 files changed, 16 insertions, 0 deletions
diff --git a/src/_cffi_src/openssl/x509.py b/src/_cffi_src/openssl/x509.py
index b5d461ab..0fc49ac5 100644
--- a/src/_cffi_src/openssl/x509.py
+++ b/src/_cffi_src/openssl/x509.py
@@ -43,9 +43,12 @@ typedef struct {
} X509_EXTENSION;
typedef ... X509_EXTENSIONS;
+typedef ... X509_REQ_INFO;
typedef struct {
+ X509_REQ_INFO *req_info;
X509_ALGOR *sig_alg;
+ ASN1_BIT_STRING *signature;
...;
} X509_REQ;
@@ -267,6 +270,7 @@ void PKCS8_PRIV_KEY_INFO_free(PKCS8_PRIV_KEY_INFO *);
MACROS = """
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 **);
long X509_get_version(X509 *);
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));
+}
+
"""