diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-09-02 15:26:09 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-09-02 15:28:56 +0200 |
commit | fb13791f26fe123eefc3eceeea1fc1401cddbd03 (patch) | |
tree | 4f4b4a60ec854256283c8abfc4dd13b01b81c5b8 | |
parent | e3181d02271a74d1add0f0914bb06b8b3ae9e7f8 (diff) | |
download | curl-bagder/native-import-openssl3.tar.gz |
openssl: avoid error conditions when importing native CAbagder/native-import-openssl3
The code section that is OpenSSL 3+ specific now uses the same logic as
is used in the version < 3 section. It caused a compiler error without
it.
-rw-r--r-- | lib/vtls/openssl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index ce6f8445a..5d3da8234 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -2993,7 +2993,7 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex) { if(ssl_cafile) { if(!SSL_CTX_load_verify_file(backend->ctx, ssl_cafile)) { - if(verifypeer) { + if(verifypeer && !imported_native_ca) { /* Fail if we insist on successfully verifying the server. */ failf(data, "error setting certificate file: %s", ssl_cafile); return CURLE_SSL_CACERT_BADFILE; @@ -3005,7 +3005,7 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex) } if(ssl_capath) { if(!SSL_CTX_load_verify_dir(backend->ctx, ssl_capath)) { - if(verifypeer) { + if(verifypeer && !imported_native_ca) { /* Fail if we insist on successfully verifying the server. */ failf(data, "error setting certificate path: %s", ssl_capath); return CURLE_SSL_CACERT_BADFILE; |