Commit 9c8dbc88 by Michael Schubert

netops: properly handle GITNO_CONNECT_SSL_NO_CHECK_CERT

Don't return an error just because GITNO_CONNECT_SSL_NO_CHECK_CERT is
set.
parent f7953509
......@@ -409,10 +409,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