Commit 857b153229d9d8053d7a2afeb524d16b0c3aec23
1 parent
9baafd8e
Exists in
master
and in
3 other branches
Melhorando indicação de status da conexão SSL
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
telnet.c
@@ -861,6 +861,9 @@ static void ssl_negotiate(H3270 *hSession) | @@ -861,6 +861,9 @@ static void ssl_negotiate(H3270 *hSession) | ||
861 | SSL_get_verify_result(hSession->ssl_con)); | 861 | SSL_get_verify_result(hSession->ssl_con)); |
862 | } | 862 | } |
863 | 863 | ||
864 | + if(!SSL_get_verify_result(hSession->ssl_con)) | ||
865 | + set_ssl_state(hSession,LIB3270_SSL_SECURE); | ||
866 | + | ||
864 | /* Tell the world that we are (still) connected, now in secure mode. */ | 867 | /* Tell the world that we are (still) connected, now in secure mode. */ |
865 | lib3270_set_connected(hSession); | 868 | lib3270_set_connected(hSession); |
866 | } | 869 | } |
@@ -3277,7 +3280,7 @@ static void ssl_info_callback(INFO_CONST SSL *s, int where, int ret) | @@ -3277,7 +3280,7 @@ static void ssl_info_callback(INFO_CONST SSL *s, int where, int ret) | ||
3277 | { | 3280 | { |
3278 | trace_dsn(hSession,"%s: SSL_CB_HANDSHAKE_DONE state=%04x\n",__FUNCTION__,SSL_state(s)); | 3281 | trace_dsn(hSession,"%s: SSL_CB_HANDSHAKE_DONE state=%04x\n",__FUNCTION__,SSL_state(s)); |
3279 | if(SSL_state(s) == 0x03) | 3282 | if(SSL_state(s) == 0x03) |
3280 | - set_ssl_state(hSession,LIB3270_SSL_SECURE); | 3283 | + set_ssl_state(hSession,LIB3270_SSL_NEGOTIATED); |
3281 | else | 3284 | else |
3282 | set_ssl_state(hSession,LIB3270_SSL_UNSECURE); | 3285 | set_ssl_state(hSession,LIB3270_SSL_UNSECURE); |
3283 | } | 3286 | } |