summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/vtls/openssl.c4
-rw-r--r--lib/vtls/schannel.c1
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
index a2ab831f2..dc4a6d122 100644
--- a/lib/vtls/openssl.c
+++ b/lib/vtls/openssl.c
@@ -3327,8 +3327,10 @@ static CURLcode import_windows_cert_store(struct Curl_easy *data,
continue;
x509 = d2i_X509(NULL, &encoded_cert, (long)pContext->cbCertEncoded);
- if(!x509)
+ if(!x509) {
+ ERR_clear_error();
continue;
+ }
/* Try to import the certificate. This may fail for legitimate
reasons such as duplicate certificate, which is allowed by MS but
diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c
index 27aceaba8..0b3ec8cc2 100644
--- a/lib/vtls/schannel.c
+++ b/lib/vtls/schannel.c
@@ -730,6 +730,7 @@ schannel_acquire_credential_handle(struct Curl_cfilter *cf,
if(!client_certs[0]) {
/* CRYPT_E_NOT_FOUND / E_INVALIDARG */
CertCloseStore(cert_store, 0);
+ failf(data, "schannel: client cert not found in cert store");
return CURLE_SSL_CERTPROBLEM;
}
}