Correct the return value of BIO_get_ktls_*().
authorJohn Baldwin <jhb@FreeBSD.org>
Fri, 29 Jan 2021 18:34:49 +0000 (10:34 -0800)
committerTomas Mraz <tomas@openssl.org>
Fri, 19 Feb 2021 17:04:35 +0000 (18:04 +0100)
commitf16e52b67c9261bdc7e1284a50502a802921ac6d
tree35f315919b8cbdf7c7d9b69617e09e07b979c00e
parent5e128ed1209335fb72fe50a68640331e354cbea6
Correct the return value of BIO_get_ktls_*().

BIO_get_ktls_send() and BIO_get_ktls_recv() are documented as
returning either 0 or 1.  However, they were actually returning the
internal value of the associated BIO flag for the true case instead of
1.

Also trim redundant ternary operators.

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14023)
crypto/bio/bss_conn.c
crypto/bio/bss_fd.c
crypto/bio/bss_sock.c