aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2021-12-14 18:07:38 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2021-12-14 18:07:38 +0000
commit27bb8830d555621d4292da8a83f3bc09176fd00d (patch)
tree2586fa4a34c5eae4aee1d821c83f43cb864d604a
parent05860ffdb42877ab1e40fd6df8a12f3d45727289 (diff)
SSL_sendfile: Replace ERR_raise_data with SYSerr.
ERR_raise_data is only present in OpenSSL 3.0 and later. Reviewed by: jkim Obtained from: CheriBSD MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D33363
-rw-r--r--crypto/openssl/ssl/ssl_lib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/openssl/ssl/ssl_lib.c b/crypto/openssl/ssl/ssl_lib.c
index 6081d8f05b11..a8514013b45e 100644
--- a/crypto/openssl/ssl/ssl_lib.c
+++ b/crypto/openssl/ssl/ssl_lib.c
@@ -2026,7 +2026,8 @@ ossl_ssize_t SSL_sendfile(SSL *s, int fd, off_t offset, size_t size, int flags)
}
#ifdef OPENSSL_NO_KTLS
- ERR_raise_data(ERR_LIB_SYS, ERR_R_INTERNAL_ERROR, "calling sendfile()");
+ SYSerr(SSL_F_SSL_SENDFILE, ERR_R_INTERNAL_ERROR);
+ ERR_add_error_data(1, "calling sendfile()");
return -1;
#else
ret = ktls_sendfile(SSL_get_wfd(s), fd, offset, size, flags);