1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

schannel: return a more specific error code for SEC_E_UNTRUSTED_ROOT

This commit is contained in:
Dan Fandrich 2017-05-04 18:19:13 +02:00
parent 7cb1e1ee01
commit 07fd7871b3

View File

@ -630,7 +630,8 @@ schannel_connect_step2(struct connectdata *conn, int sockindex)
else else
failf(data, "schannel: next InitializeSecurityContext failed: %s", failf(data, "schannel: next InitializeSecurityContext failed: %s",
Curl_sspi_strerror(conn, sspi_status)); 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 */ /* check if there was additional remaining encrypted data */