mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-07 19:43:37 +00:00
netops: on SSL teardown only send shutdown alert
According to man 3 SSL_shutdown / TLS, "If a unidirectional shutdown is enough (the underlying connection shall be closed anyway), this first call to SSL_shutdown() is sufficient." Currently, an unidirectional shutdown is enough, since gitno_ssl_teardown is called by gitno_close only. Do so to avoid further errors (by misbehaving peers for example). Fixes #1129.
This commit is contained in:
parent
9c8dbc8893
commit
f2b00cbdf6
@ -198,10 +198,7 @@ static int gitno_ssl_teardown(gitno_ssl *ssl)
|
||||
{
|
||||
int ret;
|
||||
|
||||
do {
|
||||
ret = SSL_shutdown(ssl->ssl);
|
||||
} while (ret == 0);
|
||||
|
||||
ret = SSL_shutdown(ssl->ssl);
|
||||
if (ret < 0)
|
||||
ret = ssl_set_error(ssl, ret);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user