diff options
author | Richard Levitte <levitte@openssl.org> | 2016-07-20 16:23:34 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-07-25 17:20:58 +0200 |
commit | 0a5fe2eb94ad7085fee59c3908b546af7530c9d3 (patch) | |
tree | 1dc47422873297fd1b57ccb8575f163a5064cc18 /crypto/x509/x509_vfy.c | |
parent | 1060a50b6d70cf801e08c6b97835397d1c222af9 (diff) |
Add setter and getter for X509_STORE's check_policy
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/x509/x509_vfy.c')
-rw-r--r-- | crypto/x509/x509_vfy.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c index 649390c647..a290a5e6b3 100644 --- a/crypto/x509/x509_vfy.c +++ b/crypto/x509/x509_vfy.c @@ -2285,6 +2285,11 @@ int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, else ctx->cert_crl = cert_crl; + if (store && store->check_policy) + ctx->check_policy = store->check_policy; + else + ctx->check_policy = check_policy; + if (store && store->lookup_certs) ctx->lookup_certs = store->lookup_certs; else @@ -2295,8 +2300,6 @@ int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, else ctx->lookup_crls = X509_STORE_CTX_get1_crls; - ctx->check_policy = check_policy; - ctx->param = X509_VERIFY_PARAM_new(); if (ctx->param == NULL) { X509err(X509_F_X509_STORE_CTX_INIT, ERR_R_MALLOC_FAILURE); |