git://git.exim.org
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c19ab16
)
OpenSSL: tidy coding of session keys debug
author
Jeremy Harris
<jgh146exb@wizmail.org>
Wed, 3 Apr 2019 19:13:22 +0000
(20:13 +0100)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Wed, 3 Apr 2019 19:13:22 +0000
(20:13 +0100)
src/src/tls-openssl.c
patch
|
blob
|
history
diff --git
a/src/src/tls-openssl.c
b/src/src/tls-openssl.c
index 5a5e1464ba5665d7518e251c320764fb99f35505..8671e112967205fb2b5a55b7845b3c734f6085b2 100644
(file)
--- a/
src/src/tls-openssl.c
+++ b/
src/src/tls-openssl.c
@@
-2345,12
+2345,8
@@
DEBUG(D_tls)
#ifdef EXIM_HAVE_OPENSSL_KEYLOG
{
#ifdef EXIM_HAVE_OPENSSL_KEYLOG
{
- BIO * bp = BIO_new(BIO_s_mem());
- uschar * s;
- int len;
+ BIO * bp = BIO_new_fp(debug_file, BIO_NOCLOSE);
SSL_SESSION_print_keylog(bp, SSL_get_session(server_ssl));
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);
}
#endif
BIO_free(bp);
}
#endif
@@
-2724,18
+2720,9
@@
DEBUG(D_tls)
debug_printf("SSL_connect succeeded\n");
#ifdef EXIM_HAVE_OPENSSL_KEYLOG
{
debug_printf("SSL_connect succeeded\n");
#ifdef EXIM_HAVE_OPENSSL_KEYLOG
{
- BIO * bp = BIO_new(BIO_s_mem());
- 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");
+ BIO * bp = BIO_new_fp(debug_file, BIO_NOCLOSE);
+ SSL_SESSION_print_keylog(bp, SSL_get_session(exim_client_ctx->ssl));
+ BIO_free(bp);
}
#endif
}
}
#endif
}