From 857b153229d9d8053d7a2afeb524d16b0c3aec23 Mon Sep 17 00:00:00 2001 From: perry.werneck@gmail.com Date: Thu, 3 Jan 2013 18:04:13 +0000 Subject: [PATCH] Melhorando indicação de status da conexão SSL --- telnet.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/telnet.c b/telnet.c index 1d37c3d..9e7499f 100644 --- a/telnet.c +++ b/telnet.c @@ -861,6 +861,9 @@ static void ssl_negotiate(H3270 *hSession) SSL_get_verify_result(hSession->ssl_con)); } + if(!SSL_get_verify_result(hSession->ssl_con)) + set_ssl_state(hSession,LIB3270_SSL_SECURE); + /* Tell the world that we are (still) connected, now in secure mode. */ lib3270_set_connected(hSession); } @@ -3277,7 +3280,7 @@ static void ssl_info_callback(INFO_CONST SSL *s, int where, int ret) { trace_dsn(hSession,"%s: SSL_CB_HANDSHAKE_DONE state=%04x\n",__FUNCTION__,SSL_state(s)); if(SSL_state(s) == 0x03) - set_ssl_state(hSession,LIB3270_SSL_SECURE); + set_ssl_state(hSession,LIB3270_SSL_NEGOTIATED); else set_ssl_state(hSession,LIB3270_SSL_UNSECURE); } -- libgit2 0.21.2