mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
better error output on SSL errors when receiving data - Georg Horn patch
This commit is contained in:
parent
c7f5476416
commit
d9f961ed2d
4
CHANGES
4
CHANGES
@ -7,6 +7,10 @@
|
|||||||
Changelog
|
Changelog
|
||||||
|
|
||||||
|
|
||||||
|
Daniel (19 October)
|
||||||
|
- Georg Horn made libcurl output more info on SSL failures when receiving
|
||||||
|
data.
|
||||||
|
|
||||||
Version 7.10.8-pre4 (18 October 2003)
|
Version 7.10.8-pre4 (18 October 2003)
|
||||||
|
|
||||||
Daniel (17 October)
|
Daniel (17 October)
|
||||||
|
@ -383,20 +383,17 @@ int Curl_read(struct connectdata *conn,
|
|||||||
case SSL_ERROR_WANT_WRITE:
|
case SSL_ERROR_WANT_WRITE:
|
||||||
/* there's data pending, re-invoke SSL_read() */
|
/* there's data pending, re-invoke SSL_read() */
|
||||||
return -1; /* basicly EWOULDBLOCK */
|
return -1; /* basicly EWOULDBLOCK */
|
||||||
case SSL_ERROR_SYSCALL:
|
default:
|
||||||
/* openssl/ssl.h says "look at error stack/return value/errno" */
|
/* openssl/ssl.h says "look at error stack/return value/errno" */
|
||||||
{
|
{
|
||||||
char error_buffer[120]; /* OpenSSL documents that this must be at least
|
char error_buffer[120]; /* OpenSSL documents that this must be at
|
||||||
120 bytes long. */
|
least 120 bytes long. */
|
||||||
int sslerror = ERR_get_error();
|
int sslerror = ERR_get_error();
|
||||||
failf(conn->data, "SSL read: %s, errno %d",
|
failf(conn->data, "SSL read: %s, errno %d",
|
||||||
ERR_error_string(sslerror, error_buffer),
|
ERR_error_string(sslerror, error_buffer),
|
||||||
Curl_ourerrno() );
|
Curl_ourerrno() );
|
||||||
}
|
}
|
||||||
return CURLE_RECV_ERROR;
|
return CURLE_RECV_ERROR;
|
||||||
default:
|
|
||||||
failf(conn->data, "SSL read error: %d", err);
|
|
||||||
return CURLE_RECV_ERROR;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user