From 07d7fc7b2b84ed36419abf8802b6de29f6e675cc Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Wed, 15 Oct 2014 09:54:21 +0200 Subject: Also report SSL/TLS protocol version in verbose mode. --- socket.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/socket.c b/socket.c index 87f14486..c55bd6e1 100644 --- a/socket.c +++ b/socket.c @@ -1026,13 +1026,17 @@ int SSLOpen(int sock, char *mycert, char *mykey, const char *myproto, int certck SSL_CIPHER const *sc; int bitsmax, bitsused; + const char *ver; + + ver = SSL_get_version(_ssl_context[sock]); + sc = SSL_get_current_cipher(_ssl_context[sock]); if (!sc) { report (stderr, GT_("Cannot obtain current SSL/TLS cipher - no session established?\n")); } else { bitsused = SSL_CIPHER_get_bits(sc, &bitsmax); - report(stdout, GT_("SSL/TLS: using cipher %s, %d/%d secret/processed bits\n"), - SSL_CIPHER_get_name(sc), bitsused, bitsmax); + report(stdout, GT_("SSL/TLS: using protocol %s, cipher %s, %d/%d secret/processed bits\n"), + ver, SSL_CIPHER_get_name(sc), bitsused, bitsmax); } } -- cgit v1.2.3