diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2009-06-30 11:22:25 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2009-06-30 11:22:25 +0000 |
commit | f67f8156240ba0ec8afabef1fba3bd6305a2c59e (patch) | |
tree | 22be33bb9f81959122a64d6864964a1104a218cd /ssl/ssl_cert.c | |
parent | ab8fe43fa23e920c9ac535f7ca7d9a5e2aa92ebc (diff) |
Update from 1.0.0-stable.
Diffstat (limited to 'ssl/ssl_cert.c')
-rw-r--r-- | ssl/ssl_cert.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c index a32b2d4446..9310379815 100644 --- a/ssl/ssl_cert.c +++ b/ssl/ssl_cert.c @@ -500,9 +500,6 @@ int ssl_verify_cert_chain(SSL *s,STACK_OF(X509) *sk) SSLerr(SSL_F_SSL_VERIFY_CERT_CHAIN,ERR_R_X509_LIB); return(0); } - if (s->param) - X509_VERIFY_PARAM_inherit(X509_STORE_CTX_get0_param(&ctx), - s->param); #if 0 if (SSL_get_verify_depth(s) >= 0) X509_STORE_CTX_set_depth(&ctx, SSL_get_verify_depth(s)); @@ -516,6 +513,12 @@ int ssl_verify_cert_chain(SSL *s,STACK_OF(X509) *sk) X509_STORE_CTX_set_default(&ctx, s->server ? "ssl_client" : "ssl_server"); + /* Anything non-default in "param" should overwrite anything in the + * ctx. + */ + if (s->param) + X509_VERIFY_PARAM_set1(X509_STORE_CTX_get0_param(&ctx), + s->param); if (s->verify_callback) X509_STORE_CTX_set_verify_cb(&ctx, s->verify_callback); |