diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2019-03-12 23:30:03 +0000 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2019-03-12 23:30:03 +0000 |
commit | 1f93955ec73611886a4dc90bde07c3b91b666f53 (patch) | |
tree | 1a510b28bca890aefbd3fdb75aae7b3d8d39b117 | |
parent | 0781a8a50694b18cc1cf30e90a7d127ef0bfe7e9 (diff) |
Fix debug output of TLS keying info, client-side with OpenSSL
-rw-r--r-- | src/src/tls-openssl.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/src/tls-openssl.c b/src/src/tls-openssl.c index 306877f22..d37c78970 100644 --- a/src/src/tls-openssl.c +++ b/src/src/tls-openssl.c @@ -2723,12 +2723,17 @@ DEBUG(D_tls) #ifdef EXIM_HAVE_OPENSSL_KEYLOG { BIO * bp = BIO_new(BIO_s_mem()); - uschar * s; - int len; - SSL_SESSION_print_keylog(bp, SSL_get_session(server_ssl)); - len = (int) BIO_get_mem_data(bp, CSS &s); - debug_printf("%.*s", len, s); - BIO_free(bp); + if (bp) + { + uschar * s; + int len; + SSL_SESSION_print_keylog(bp, SSL_get_session(exim_client_ctx->ssl)); + len = (int) BIO_get_mem_data(bp, CSS &s); + debug_printf("%.*s", len, s); + BIO_free(bp); + } + else + debug_printf("(alloc failure for keylog)\n"); } #endif } |