1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

strerror: Change SEC_E_ILLEGAL_MESSAGE description

Prior to this change the description for SEC_E_ILLEGAL_MESSAGE was OS
and language specific, and invariably translated to something not very
helpful like: "The message received was unexpected or badly formatted."

Bug: https://github.com/bagder/curl/issues/267
Reported-by: Michael Osipov
This commit is contained in:
Jay Satiro 2015-05-22 02:30:38 -04:00
parent 78ac944dc2
commit 995c6006fe

View File

@ -1067,6 +1067,12 @@ const char *Curl_sspi_strerror (struct connectdata *conn, int err)
if(err == SEC_E_OK) if(err == SEC_E_OK)
strncpy(outbuf, txt, outmax); strncpy(outbuf, txt, outmax);
else if(err == SEC_E_ILLEGAL_MESSAGE)
snprintf(outbuf, outmax,
"SEC_E_ILLEGAL_MESSAGE (0x%04X%04X) - This error usually occurs "
"when a fatal SSL/TLS alert is received (e.g. handshake failed). "
"More detail may be available in the Windows System event log.",
(err >> 16) & 0xffff, err & 0xffff);
else { else {
str = txtbuf; str = txtbuf;
snprintf(txtbuf, sizeof(txtbuf), "%s (0x%04X%04X)", snprintf(txtbuf, sizeof(txtbuf), "%s (0x%04X%04X)",