mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 16:18:48 -05:00
PolarSSL: Return 0 on receiving TLS CLOSE_NOTIFY alert
Signed-off-by: Hoi-Ho Chan <hoiho.chan@gmail.com>
This commit is contained in:
parent
d9805c5b2b
commit
05895927f5
@ -352,6 +352,9 @@ static ssize_t polarssl_recv(struct connectdata *conn,
|
||||
ret = ssl_read(&conn->ssl[num].ssl, (unsigned char *)buf, buffersize);
|
||||
|
||||
if(ret <= 0) {
|
||||
if(ret == POLARSSL_ERR_SSL_PEER_CLOSE_NOTIFY)
|
||||
return 0;
|
||||
|
||||
*curlcode = (ret == POLARSSL_ERR_NET_TRY_AGAIN) ?
|
||||
CURLE_AGAIN : CURLE_RECV_ERROR;
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user