Slightly abstract ktls_start() to reduce OS-specific #ifdefs.
authorJohn Baldwin <jhb@FreeBSD.org>
Tue, 1 Sep 2020 00:13:17 +0000 (17:13 -0700)
committerBenjamin Kaduk <bkaduk@akamai.com>
Sun, 6 Sep 2020 03:11:50 +0000 (20:11 -0700)
commit7f0f88240e181b6c95d55893cbab55e0765a1d89
tree16ea6d07a37a1cd0bd77b7d32a17d5402d13116c
parent74eee1bdaa03cfcb3b1df01beff2b6d81a113f58
Slightly abstract ktls_start() to reduce OS-specific #ifdefs.

Instead of passing the length in from the caller, compute the length
to pass to setsockopt() inside of ktls_start().  This isolates the
OS-specific behavior to ktls.h and removes it from the socket BIO
implementations.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/12782)
crypto/bio/bss_conn.c
crypto/bio/bss_sock.c
include/internal/ktls.h