Fix bug in s_client. Previously default verify locations would only be loaded
if CAfile or CApath were also supplied and successfully loaded first. Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit 70e5fd877890489a3972bf8bf50bfec1fca3875e)
This commit is contained in:
parent
42c9c7103c
commit
fe9b85c3cb
@ -1177,13 +1177,12 @@ int MAIN(int argc, char **argv)
|
|||||||
if (!set_cert_key_stuff(ctx, cert, key))
|
if (!set_cert_key_stuff(ctx, cert, key))
|
||||||
goto end;
|
goto end;
|
||||||
|
|
||||||
if ((!SSL_CTX_load_verify_locations(ctx, CAfile, CApath)) ||
|
if ((CAfile || CApath)
|
||||||
(!SSL_CTX_set_default_verify_paths(ctx))) {
|
&& !SSL_CTX_load_verify_locations(ctx, CAfile, CApath)) {
|
||||||
/*
|
ERR_print_errors(bio_err);
|
||||||
* BIO_printf(bio_err,"error setting default verify locations\n");
|
}
|
||||||
*/
|
if (!SSL_CTX_set_default_verify_paths(ctx)) {
|
||||||
ERR_print_errors(bio_err);
|
ERR_print_errors(bio_err);
|
||||||
/* goto end; */
|
|
||||||
}
|
}
|
||||||
#ifndef OPENSSL_NO_TLSEXT
|
#ifndef OPENSSL_NO_TLSEXT
|
||||||
if (servername != NULL) {
|
if (servername != NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user