aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2017-05-04 18:19:13 +0200
committerDan Fandrich <dan@coneharvesters.com>2017-05-04 18:19:33 +0200
commit07fd7871b38cc8472c3806e254ba4062e3adeae0 (patch)
treef60fcd92db83494d5dac2d2d5a53fb5101700615
parent7cb1e1ee0136b3e37b1b234342c64f2fc181a6b2 (diff)
schannel: return a more specific error code for SEC_E_UNTRUSTED_ROOT
-rw-r--r--lib/vtls/schannel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c
index d20f30d89..94603018b 100644
--- a/lib/vtls/schannel.c
+++ b/lib/vtls/schannel.c
@@ -630,7 +630,8 @@ schannel_connect_step2(struct connectdata *conn, int sockindex)
else
failf(data, "schannel: next InitializeSecurityContext failed: %s",
Curl_sspi_strerror(conn, sspi_status));
- return CURLE_SSL_CONNECT_ERROR;
+ return sspi_status == SEC_E_UNTRUSTED_ROOT ?
+ CURLE_SSL_CACERT_BADFILE : CURLE_SSL_CONNECT_ERROR;
}
/* check if there was additional remaining encrypted data */