[openssl/openssl] 598bd7: Fix KTLS with BIO_new_connect
bernd-edlinger
noreply at reply.github.openssl.org
Tue May 17 11:16:35 UTC 2022
Branch: refs/heads/master
Home: https://github.openssl.org/openssl/openssl
Commit: 598bd7741568a1aae678e5472f18aae1ab991e8d
https://github.openssl.org/openssl/openssl/commit/598bd7741568a1aae678e5472f18aae1ab991e8d
Author: Bernd Edlinger <bernd.edlinger at hotmail.de>
Date: 2022-05-17 (Tue, 17 May 2022)
Changed paths:
M crypto/bio/bio_sock.c
M crypto/bio/bio_sock2.c
M crypto/bio/bss_conn.c
M test/ssl_old_test.c
Log Message:
-----------
Fix KTLS with BIO_new_connect
When a socket connection is done using BIO_new_connect,
the ktls_enable is done too early, and fails with ENOTCONN.
Therefore the KLTS ioctl will fail later with ENOPROTOOPT.
Fix that by doing the ktls_enable after the connection
succeeded, not when the socket is created as that will
always fail.
One example where this happens is doit_localhost in
test/ssl_old_test.c, and therefore, contrary to the expectation
the -client_ktls option did never enable the client KTLS
connection, but this was not noticed, because there was no
diagnostic output, and it was only visible with strace output.
Also enhanced the ssl_old_test -client_ktls/-server_ktls
options together with -v option to print a summary line
if and how KTLS was negotiated in server and client.
While I am already there adjusted the usage info of
the -s_cert, -s_key commands, and allow -time to print the
timings of ktls connections.
Reviewed-by: Matt Caswell <matt at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18318)
More information about the openssl-commits
mailing list