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
1 changed files with 2 additions and 1 deletions

View File

@ -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 */