Commit 78b6471f14ee0368809cb3bd7e746d2e4c9bdf2a

Authored by perry.werneck@gmail.com
1 parent 747869dd

Procurando erro de SSL BB

Showing 1 changed file with 12 additions and 3 deletions   Show diff stats
src/lib3270/telnet.c
... ... @@ -316,7 +316,7 @@ static void ssl_init(H3270 *session);
316 316 #else /*][*/
317 317 #define INFO_CONST
318 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 320 static void continue_tls(unsigned char *sbbuf, int len);
321 321 #endif /*]*/
322 322  
... ... @@ -3271,7 +3271,7 @@ static void ssl_init(H3270 *session)
3271 3271 return;
3272 3272 }
3273 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 3275 SSL_CTX_set_default_verify_paths(ssl_ctx);
3276 3276 }
3277 3277  
... ... @@ -3309,7 +3309,7 @@ static void ssl_init(H3270 *session)
3309 3309 }
3310 3310  
3311 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 3314 switch(where)
3315 3315 {
... ... @@ -3375,6 +3375,15 @@ static void client_info_callback(INFO_CONST SSL *s, int where, int ret)
3375 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 3387 if(where & SSL_CB_ALERT)
3379 3388 lib3270_write_log(NULL,"SSL","ALERT: %s",SSL_alert_type_string_long(ret));
3380 3389  
... ...