From 524bac570702a79366b85ff1f66e07d3e002370c Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Tue, 26 Apr 2022 09:42:01 +0200 Subject: Fix BIO_get_ktls_send/recv to return 0 or 1 only Fixes #18176 Reviewed-by: Matt Caswell Reviewed-by: Bernd Edlinger (Merged from https://github.com/openssl/openssl/pull/18178) --- include/openssl/bio.h.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/openssl/bio.h.in b/include/openssl/bio.h.in index 4b11c77779..46697ce3d7 100644 --- a/include/openssl/bio.h.in +++ b/include/openssl/bio.h.in @@ -174,9 +174,9 @@ extern "C" { # ifndef OPENSSL_NO_KTLS # define BIO_get_ktls_send(b) \ - BIO_ctrl(b, BIO_CTRL_GET_KTLS_SEND, 0, NULL) + (BIO_ctrl(b, BIO_CTRL_GET_KTLS_SEND, 0, NULL) > 0) # define BIO_get_ktls_recv(b) \ - BIO_ctrl(b, BIO_CTRL_GET_KTLS_RECV, 0, NULL) + (BIO_ctrl(b, BIO_CTRL_GET_KTLS_RECV, 0, NULL) > 0) # else # define BIO_get_ktls_send(b) (0) # define BIO_get_ktls_recv(b) (0) -- cgit v1.2.3