aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Satiro <raysatiro@yahoo.com>2015-05-22 02:30:38 -0400
committerJay Satiro <raysatiro@yahoo.com>2015-05-22 02:30:38 -0400
commit995c6006fecf7633f9fc5eb4b72da4f282fc12bb (patch)
tree5b4e23c466cbaa7df66e574af0e4b95bf062a8ec
parent78ac944dc267481992a5edbbb5791028687420a7 (diff)
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
-rw-r--r--lib/strerror.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/strerror.c b/lib/strerror.c
index e653af43e..cbc5c4735 100644
--- a/lib/strerror.c
+++ b/lib/strerror.c
@@ -1067,6 +1067,12 @@ const char *Curl_sspi_strerror (struct connectdata *conn, int err)
if(err == SEC_E_OK)
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 {
str = txtbuf;
snprintf(txtbuf, sizeof(txtbuf), "%s (0x%04X%04X)",