summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorNeil Horman <nhorman@openssl.org>2024-03-01 10:12:01 -0500
committerTomas Mraz <tomas@openssl.org>2024-04-26 17:10:34 +0200
commit3dcd85139f30625f2e4d072fe2b0f211f76f819c (patch)
treef11f631c5ab780d10fd7fed4a5dbbe2e070b4277 /ssl
parent3059052992ab61b0ba560ddf48111cecb5158ae2 (diff)
Make a failure in ktls_sendfile a syscall error
a failure in ktls_sendfile results in an error in ERR_LIB_SSL, but its really a syscall error, since ktls_sendfile just maps to a call to the sendfile syscall. Encode it as such Fixes #23722 Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23723)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/ssl_lib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index ccb2f28604..ed3522c7f5 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -2603,7 +2603,8 @@ ossl_ssize_t SSL_sendfile(SSL *s, int fd, off_t offset, size_t size, int flags)
BIO_set_retry_write(sc->wbio);
else
#endif
- ERR_raise(ERR_LIB_SSL, SSL_R_UNINITIALIZED);
+ ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
+ "ktls_sendfile failure");
return ret;
}
sc->rwstate = SSL_NOTHING;