summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorInsu Yun <wuninsu@gmail.com>2015-11-20 16:51:08 -0500
committerPatrick Griffis <tingping@tingping.se>2016-02-19 07:26:50 -0500
commit50463ca8321c39f3966c278ab25ca158404d72f1 (patch)
treef64d6a19d1dde4ca79965108086b6e35c2c36f82 /src
parent0826e7d353f1b29dd5feaaaf3e90b02965ffab2f (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/common/server.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/common/server.c b/src/common/server.c
index e4c2e377..19e90969 100644
--- a/src/common/server.c
+++ b/src/common/server.c
@@ -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 */