From c969e89a7936359c582b76a1ffe5968d2c4165fb Mon Sep 17 00:00:00 2001 From: Cory Benfield Date: Wed, 6 May 2015 22:01:37 +0100 Subject: Expand out definition of X509_STORE_CTX --- src/cryptography/hazmat/bindings/openssl/x509_vfy.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/cryptography/hazmat/bindings/openssl/x509_vfy.py b/src/cryptography/hazmat/bindings/openssl/x509_vfy.py index 1f75b86f..1334d72d 100644 --- a/src/cryptography/hazmat/bindings/openssl/x509_vfy.py +++ b/src/cryptography/hazmat/bindings/openssl/x509_vfy.py @@ -29,9 +29,22 @@ static const long Cryptography_HAS_X509_V_FLAG_CHECK_SS_SIGNATURE; typedef ... Cryptography_STACK_OF_ASN1_OBJECT; typedef ... X509_STORE; -typedef ... X509_STORE_CTX; typedef ... X509_VERIFY_PARAM; +typedef struct x509_store_ctx_st { + X509_STORE *ctx; + int current_method; + X509 *cert; + Cryptography_STACK_OF_X509 *untrusted; + Cryptography_STACK_OF_X509_CRL *crls; + X509_VERIFY_PARAM *param; + void *other_ctx; + int (*verify)(struct x509_store_ctx_st *ctx); + int (*verify_cb)(int ok,struct x509_store_ctx_st *ctx); + int (*get_issuer)(X509 **issuer, struct x509_store_ctx_st *ctx, X509 *x); + ...; +} X509_STORE_CTX; + /* While these are defined in the source as ints, they're tagged here as longs, just in case they ever grow to large, such as what we saw with OP_ALL. */ -- cgit v1.2.3 From 18f913e86f01b1fe5470aa3f3139102d222b0f1e Mon Sep 17 00:00:00 2001 From: Cory Benfield Date: Thu, 7 May 2015 19:52:24 +0100 Subject: Cleanup definition --- src/cryptography/hazmat/bindings/openssl/x509_vfy.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/cryptography/hazmat/bindings/openssl/x509_vfy.py b/src/cryptography/hazmat/bindings/openssl/x509_vfy.py index 1334d72d..02631409 100644 --- a/src/cryptography/hazmat/bindings/openssl/x509_vfy.py +++ b/src/cryptography/hazmat/bindings/openssl/x509_vfy.py @@ -31,7 +31,8 @@ typedef ... Cryptography_STACK_OF_ASN1_OBJECT; typedef ... X509_STORE; typedef ... X509_VERIFY_PARAM; -typedef struct x509_store_ctx_st { +typedef struct x509_store_ctx_st X509_STORE_CTX; +struct x509_store_ctx_st { X509_STORE *ctx; int current_method; X509 *cert; @@ -39,11 +40,11 @@ typedef struct x509_store_ctx_st { Cryptography_STACK_OF_X509_CRL *crls; X509_VERIFY_PARAM *param; void *other_ctx; - int (*verify)(struct x509_store_ctx_st *ctx); - int (*verify_cb)(int ok,struct x509_store_ctx_st *ctx); - int (*get_issuer)(X509 **issuer, struct x509_store_ctx_st *ctx, X509 *x); + int (*verify)(X509_STORE_CTX *); + int (*verify_cb)(int, X509_STORE_CTX *); + int (*get_issuer)(X509 **, X509_STORE_CTX *, X509 *); ...; -} X509_STORE_CTX; +}; /* While these are defined in the source as ints, they're tagged here as longs, just in case they ever grow to large, such as what we saw -- cgit v1.2.3