summaryrefslogtreecommitdiff
path: root/lib/vtls/openssl.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/vtls/openssl.c')
-rw-r--r--lib/vtls/openssl.c4
1 files changed, 3 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