diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2017-05-04 18:19:13 +0200 |
---|---|---|
committer | Dan Fandrich <dan@coneharvesters.com> | 2017-05-04 18:19:33 +0200 |
commit | 07fd7871b38cc8472c3806e254ba4062e3adeae0 (patch) | |
tree | f60fcd92db83494d5dac2d2d5a53fb5101700615 | |
parent | 7cb1e1ee0136b3e37b1b234342c64f2fc181a6b2 (diff) | |
download | curl-07fd7871b38cc8472c3806e254ba4062e3adeae0.tar.gz |
schannel: return a more specific error code for SEC_E_UNTRUSTED_ROOT
-rw-r--r-- | lib/vtls/schannel.c | 3 |
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 */ |