mirror of
https://github.com/curl/curl.git
synced 2025-04-12 16:20:35 +08:00
ossl_recv: SSL_read() returning 0 is an error too
SSL_read can return 0 for "not successful", according to the open SSL documentation: http://www.openssl.org/docs/ssl/SSL_read.html
This commit is contained in:
parent
e58d9c87f7
commit
520833cbe1
@ -2595,7 +2595,7 @@ static ssize_t ossl_recv(struct connectdata *conn, /* connection data */
|
||||
|
||||
buffsize = (buffersize > (size_t)INT_MAX) ? INT_MAX : (int)buffersize;
|
||||
nread = (ssize_t)SSL_read(conn->ssl[num].handle, buf, buffsize);
|
||||
if(nread < 0) {
|
||||
if(nread <= 0) {
|
||||
/* failed SSL_read */
|
||||
int err = SSL_get_error(conn->ssl[num].handle, (int)nread);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user