Commit b25d6631a679adf0c06e06303ef78cf6fadb34c7
1 parent
dfe3a1e0
Exists in
master
and in
5 other branches
Melhorando testes SSL
Showing
1 changed file
with
8 additions
and
12 deletions
Show diff stats
src/lib3270/telnet.c
... | ... | @@ -3243,6 +3243,7 @@ static void continue_tls(H3270 *hSession, unsigned char *sbbuf, int len) |
3243 | 3243 | if(hSession->ssl_con == NULL) |
3244 | 3244 | { |
3245 | 3245 | /* Failed. */ |
3246 | + popup_an_error(hSession,_( "SSL init failed!")); | |
3246 | 3247 | net_disconnect(hSession); |
3247 | 3248 | return; |
3248 | 3249 | } |
... | ... | @@ -3251,24 +3252,19 @@ static void continue_tls(H3270 *hSession, unsigned char *sbbuf, int len) |
3251 | 3252 | if(SSL_set_fd(hSession->ssl_con, hSession->sock) != 1) |
3252 | 3253 | { |
3253 | 3254 | trace_dsn(hSession,"SSL_set_fd failed!\n"); |
3255 | + popup_an_error(hSession,_( "SSL_set_fd failed!")); | |
3256 | + net_disconnect(hSession); | |
3257 | + return; | |
3254 | 3258 | } |
3255 | 3259 | |
3256 | -//#if defined(_WIN32) | |
3257 | -// /* Make the socket blocking for SSL. */ | |
3258 | -// (void) WSAEventSelect(hSession->sock, hSession->sock_handle, 0); | |
3259 | -// (void) non_blocking(False); | |
3260 | -//#endif | |
3261 | - | |
3260 | + trace("%s: Running SSL_connect",__FUNCTION__); | |
3262 | 3261 | rv = SSL_connect(hSession->ssl_con); |
3263 | - | |
3264 | -//#if defined(_WIN32) | |
3265 | -// // Make the socket non-blocking again for event processing | |
3266 | -// (void) WSAEventSelect(hSession->sock, hSession->sock_handle, FD_READ | FD_CONNECT | FD_CLOSE); | |
3267 | -//#endif | |
3262 | + trace("%s: SSL_connect exits with rc=%d",__FUNCTION__,rv); | |
3268 | 3263 | |
3269 | 3264 | if (rv != 1) |
3270 | 3265 | { |
3271 | 3266 | trace_dsn(hSession,"continue_tls: SSL_connect failed\n"); |
3267 | + popup_an_error(hSession,_( "SSL connect failed!")); | |
3272 | 3268 | net_disconnect(hSession); |
3273 | 3269 | return; |
3274 | 3270 | } |
... | ... | @@ -3276,7 +3272,7 @@ static void continue_tls(H3270 *hSession, unsigned char *sbbuf, int len) |
3276 | 3272 | // hSession->secure_connection = True; |
3277 | 3273 | |
3278 | 3274 | /* Success. */ |
3279 | -// trace_dsn(hSession,"TLS/SSL negotiated connection complete. Connection is now secure.\n"); | |
3275 | + trace_dsn(hSession,"TLS/SSL negotiated connection complete. Connection is now secure.\n"); | |
3280 | 3276 | |
3281 | 3277 | /* Tell the world that we are (still) connected, now in secure mode. */ |
3282 | 3278 | lib3270_set_connected(hSession); | ... | ... |