Support KTLS on connections using BIO_TYPE_CONNECT.
authorJohn Baldwin <jhb@FreeBSD.org>
Tue, 19 Nov 2019 22:12:56 +0000 (14:12 -0800)
committerTomas Mraz <tmraz@fedoraproject.org>
Mon, 16 Mar 2020 09:41:51 +0000 (10:41 +0100)
commitb1f79e7ce54afc28bfb5dfcfdd379782ed501b0a
treecb508795d111211912bb91cfaef00e76debd2952
parentfda127beb2b3c029741573b0dd931295b3446fd2
Support KTLS on connections using BIO_TYPE_CONNECT.

This requires duplicating the KTLS changes from bss_sock.c in
bss_conn.c.  One difference from BIO_TYPE_SOCKET is that the call to
ktls_enable is performed after the socket is created in BIO_socket
rather than BIO_new_connect.

Some applications such as 'openssl s_time' use connect BIOs instead of
socket BIOs.  Note that the new connections created for accept BIOs
use BIO_TYPE_SOCKET via BIO_new_socket, so bss_acpt.c does not require
changes.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/10489)
crypto/bio/b_sock2.c
crypto/bio/bss_conn.c