1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -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:
Hoi-Ho Chan 2011-02-17 21:46:59 -08:00 committed by Daniel Stenberg
parent d9805c5b2b
commit 05895927f5

View File

@ -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;