mbedTLS: Log the TLS version and cipher suite
authorFabian Keil <fk@fabiankeil.de>
Sat, 13 Feb 2021 21:49:18 +0000 (22:49 +0100)
committerFabian Keil <fk@fabiankeil.de>
Sun, 21 Feb 2021 15:09:20 +0000 (16:09 +0100)
ssl.c

diff --git a/ssl.c b/ssl.c
index cf1e8a0..4862609 100644 (file)
--- a/ssl.c
+++ b/ssl.c
@@ -479,7 +479,10 @@ extern int create_client_ssl_connection(struct client_state *csp)
       }
    }
 
-   log_error(LOG_LEVEL_CONNECT, "Client successfully connected over TLS/SSL");
+   log_error(LOG_LEVEL_CONNECT, "Client successfully connected over %s (%s).",
+      mbedtls_ssl_get_version(&(ssl_attr->mbedtls_attr.ssl)),
+      mbedtls_ssl_get_ciphersuite(&(ssl_attr->mbedtls_attr.ssl)));
+
    csp->ssl_with_client_is_opened = 1;
 
 exit:
@@ -754,7 +757,9 @@ extern int create_server_ssl_connection(struct client_state *csp)
       }
    }
 
-   log_error(LOG_LEVEL_CONNECT, "Server successfully connected over TLS/SSL");
+   log_error(LOG_LEVEL_CONNECT, "Server successfully connected over %s (%s).",
+      mbedtls_ssl_get_version(&(ssl_attr->mbedtls_attr.ssl)),
+      mbedtls_ssl_get_ciphersuite(&(ssl_attr->mbedtls_attr.ssl)));
 
    /*
     * Server certificate chain is valid, so we can clean