Properly handle missing SSL certificate

According to OpenSSL document
(https://www.openssl.org/docs/manmaster/ssl/SSL_get_verify_result.html),
when using SSL_get_verify_result(), the existence of certificate
needs to be checked. However, in current code, it does not.
Therefore, certificate existence check is required for correctly
handling the exception.

Closes #1549
This commit is contained in:
Insu Yun 2015-11-20 16:51:08 -05:00 committed by Patrick Griffis
parent 0826e7d353
commit 50463ca832

View File

@ -569,9 +569,8 @@ ssl_do_connect (server * serv)
NULL, 0);
} else
{
g_snprintf (buf, sizeof (buf), " * No Certificate");
EMIT_SIGNAL (XP_TE_SSLMESSAGE, serv->server_session, buf, NULL, NULL,
NULL, 0);
g_snprintf (buf, sizeof (buf), "No Certificate");
goto conn_fail;
}
chiper_info = _SSL_get_cipher_info (serv->ssl); /* static buffer */