From d6c3c1896cf3c0d69bc27da923d63f8130b13ca0 Mon Sep 17 00:00:00 2001 From: Boris Pismenny Date: Wed, 14 Nov 2018 23:53:57 +0200 Subject: [PATCH] apps: print Kernel TLS in s_client and s_server Signed-off-by: Boris Pismenny Reviewed-by: Tim Hudson Reviewed-by: Paul Yang Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/5253) --- apps/s_client.c | 4 ++++ apps/s_server.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/apps/s_client.c b/apps/s_client.c index 8a7613d5c7..8bdfbb65f1 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -3245,6 +3245,10 @@ static void print_stuff(BIO *bio, SSL *s, int full) BIO_printf(bio, "Expansion: %s\n", expansion ? SSL_COMP_get_name(expansion) : "NONE"); #endif +#ifndef OPENSSL_NO_KTLS + if (BIO_get_ktls_send(SSL_get_wbio(s))) + BIO_printf(bio_err, "Using Kernel TLS for sending\n"); +#endif #ifdef SSL_DEBUG { diff --git a/apps/s_server.c b/apps/s_server.c index 692116137a..364f76b3f0 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -2911,6 +2911,10 @@ static void print_connection_info(SSL *con) } OPENSSL_free(exportedkeymat); } +#ifndef OPENSSL_NO_KTLS + if (BIO_get_ktls_send(SSL_get_wbio(con))) + BIO_printf(bio_err, "Using Kernel TLS for sending\n"); +#endif (void)BIO_flush(bio_s_out); }