Commit 5c3c86b0 by Vicent Martí

Merge pull request #1150 from schu/fix-netops-ssl

netops: on SSL teardown only send shutdown alert
parents 08a325a3 f2b00cbd
......@@ -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
......@@ -409,10 +406,10 @@ static int ssl_setup(gitno_socket *socket, const char *host, int flags)
if ((ret = SSL_connect(socket->ssl.ssl)) <= 0)
return ssl_set_error(&socket->ssl, ret);
if ((GITNO_CONNECT_SSL_NO_CHECK_CERT & flags) || verify_server_cert(&socket->ssl, host) < 0)
return -1;
if (GITNO_CONNECT_SSL_NO_CHECK_CERT & flags)
return 0;
return 0;
return verify_server_cert(&socket->ssl, host);
}
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment