diff options
Diffstat (limited to 'src/lib/libssl/ssl_cert.c')
-rw-r--r-- | src/lib/libssl/ssl_cert.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/lib/libssl/ssl_cert.c b/src/lib/libssl/ssl_cert.c index a32b2d4446..27256eea81 100644 --- a/src/lib/libssl/ssl_cert.c +++ b/src/lib/libssl/ssl_cert.c | |||
@@ -56,7 +56,7 @@ | |||
56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
57 | */ | 57 | */ |
58 | /* ==================================================================== | 58 | /* ==================================================================== |
59 | * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. | 59 | * Copyright (c) 1998-2007 The OpenSSL Project. All rights reserved. |
60 | * | 60 | * |
61 | * Redistribution and use in source and binary forms, with or without | 61 | * Redistribution and use in source and binary forms, with or without |
62 | * modification, are permitted provided that the following conditions | 62 | * modification, are permitted provided that the following conditions |
@@ -197,8 +197,10 @@ CERT *ssl_cert_dup(CERT *cert) | |||
197 | * if you find that more readable */ | 197 | * if you find that more readable */ |
198 | 198 | ||
199 | ret->valid = cert->valid; | 199 | ret->valid = cert->valid; |
200 | ret->mask = cert->mask; | 200 | ret->mask_k = cert->mask_k; |
201 | ret->export_mask = cert->export_mask; | 201 | ret->mask_a = cert->mask_a; |
202 | ret->export_mask_k = cert->export_mask_k; | ||
203 | ret->export_mask_a = cert->export_mask_a; | ||
202 | 204 | ||
203 | #ifndef OPENSSL_NO_RSA | 205 | #ifndef OPENSSL_NO_RSA |
204 | if (cert->rsa_tmp != NULL) | 206 | if (cert->rsa_tmp != NULL) |
@@ -500,9 +502,6 @@ int ssl_verify_cert_chain(SSL *s,STACK_OF(X509) *sk) | |||
500 | SSLerr(SSL_F_SSL_VERIFY_CERT_CHAIN,ERR_R_X509_LIB); | 502 | SSLerr(SSL_F_SSL_VERIFY_CERT_CHAIN,ERR_R_X509_LIB); |
501 | return(0); | 503 | return(0); |
502 | } | 504 | } |
503 | if (s->param) | ||
504 | X509_VERIFY_PARAM_inherit(X509_STORE_CTX_get0_param(&ctx), | ||
505 | s->param); | ||
506 | #if 0 | 505 | #if 0 |
507 | if (SSL_get_verify_depth(s) >= 0) | 506 | if (SSL_get_verify_depth(s) >= 0) |
508 | X509_STORE_CTX_set_depth(&ctx, SSL_get_verify_depth(s)); | 507 | X509_STORE_CTX_set_depth(&ctx, SSL_get_verify_depth(s)); |
@@ -516,6 +515,10 @@ int ssl_verify_cert_chain(SSL *s,STACK_OF(X509) *sk) | |||
516 | 515 | ||
517 | X509_STORE_CTX_set_default(&ctx, | 516 | X509_STORE_CTX_set_default(&ctx, |
518 | s->server ? "ssl_client" : "ssl_server"); | 517 | s->server ? "ssl_client" : "ssl_server"); |
518 | /* Anything non-default in "param" should overwrite anything in the | ||
519 | * ctx. | ||
520 | */ | ||
521 | X509_VERIFY_PARAM_set1(X509_STORE_CTX_get0_param(&ctx), s->param); | ||
519 | 522 | ||
520 | if (s->verify_callback) | 523 | if (s->verify_callback) |
521 | X509_STORE_CTX_set_verify_cb(&ctx, s->verify_callback); | 524 | X509_STORE_CTX_set_verify_cb(&ctx, s->verify_callback); |
@@ -752,6 +755,8 @@ int SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack, | |||
752 | sk_X509_NAME_push(stack,xn); | 755 | sk_X509_NAME_push(stack,xn); |
753 | } | 756 | } |
754 | 757 | ||
758 | ERR_clear_error(); | ||
759 | |||
755 | if (0) | 760 | if (0) |
756 | { | 761 | { |
757 | err: | 762 | err: |