Commit be75b9f6b645aee669a881157dd2cad42a72cc90
1 parent
e5ae34e0
Exists in
master
and in
3 other branches
Procurando erro de SSL BB
Showing
1 changed file
with
12 additions
and
3 deletions
Show diff stats
telnet.c
@@ -316,7 +316,7 @@ static void ssl_init(H3270 *session); | @@ -316,7 +316,7 @@ static void ssl_init(H3270 *session); | ||
316 | #else /*][*/ | 316 | #else /*][*/ |
317 | #define INFO_CONST | 317 | #define INFO_CONST |
318 | #endif /*]*/ | 318 | #endif /*]*/ |
319 | -static void client_info_callback(INFO_CONST SSL *s, int where, int ret); | 319 | +static void ssl_info_callback(INFO_CONST SSL *s, int where, int ret); |
320 | static void continue_tls(unsigned char *sbbuf, int len); | 320 | static void continue_tls(unsigned char *sbbuf, int len); |
321 | #endif /*]*/ | 321 | #endif /*]*/ |
322 | 322 | ||
@@ -3271,7 +3271,7 @@ static void ssl_init(H3270 *session) | @@ -3271,7 +3271,7 @@ static void ssl_init(H3270 *session) | ||
3271 | return; | 3271 | return; |
3272 | } | 3272 | } |
3273 | SSL_CTX_set_options(ssl_ctx, SSL_OP_ALL); | 3273 | SSL_CTX_set_options(ssl_ctx, SSL_OP_ALL); |
3274 | - SSL_CTX_set_info_callback(ssl_ctx, client_info_callback); | 3274 | + SSL_CTX_set_info_callback(ssl_ctx, ssl_info_callback); |
3275 | SSL_CTX_set_default_verify_paths(ssl_ctx); | 3275 | SSL_CTX_set_default_verify_paths(ssl_ctx); |
3276 | } | 3276 | } |
3277 | 3277 | ||
@@ -3309,7 +3309,7 @@ static void ssl_init(H3270 *session) | @@ -3309,7 +3309,7 @@ static void ssl_init(H3270 *session) | ||
3309 | } | 3309 | } |
3310 | 3310 | ||
3311 | /* Callback for tracing protocol negotiation. */ | 3311 | /* Callback for tracing protocol negotiation. */ |
3312 | -static void client_info_callback(INFO_CONST SSL *s, int where, int ret) | 3312 | +static void ssl_info_callback(INFO_CONST SSL *s, int where, int ret) |
3313 | { | 3313 | { |
3314 | switch(where) | 3314 | switch(where) |
3315 | { | 3315 | { |
@@ -3375,6 +3375,15 @@ static void client_info_callback(INFO_CONST SSL *s, int where, int ret) | @@ -3375,6 +3375,15 @@ static void client_info_callback(INFO_CONST SSL *s, int where, int ret) | ||
3375 | lib3270_write_log(NULL,"SSL","Current state is \"%s\"",SSL_state_string_long(s)); | 3375 | lib3270_write_log(NULL,"SSL","Current state is \"%s\"",SSL_state_string_long(s)); |
3376 | } | 3376 | } |
3377 | 3377 | ||
3378 | + trace("%s: where=%04x ret=%d",__FUNCTION__,where,ret); | ||
3379 | + | ||
3380 | +#ifdef DEBUG | ||
3381 | + if(where & SSL_CB_EXIT) | ||
3382 | + { | ||
3383 | + trace("%s: SSL_CB_EXIT ret=%d",__FUNCTION__,ret); | ||
3384 | + } | ||
3385 | +#endif | ||
3386 | + | ||
3378 | if(where & SSL_CB_ALERT) | 3387 | if(where & SSL_CB_ALERT) |
3379 | lib3270_write_log(NULL,"SSL","ALERT: %s",SSL_alert_type_string_long(ret)); | 3388 | lib3270_write_log(NULL,"SSL","ALERT: %s",SSL_alert_type_string_long(ret)); |
3380 | 3389 |