Skip to content

Commit

Permalink
Make a failure in ktls_sendfile a syscall error
Browse files Browse the repository at this point in the history
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 #23723)
  • Loading branch information
nhorman authored and t8m committed Apr 26, 2024
1 parent 3059052 commit 3dcd851
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ssl/ssl_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3dcd851

Please sign in to comment.