diff options
author | Neil Horman <nhorman@openssl.org> | 2024-03-13 11:22:15 -0400 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2024-04-26 17:10:38 +0200 |
commit | 933f57dfe21657f7aba8f13e0cdb3b02dd64fcc3 (patch) | |
tree | bcced5897ae812cafc5e51403c536056eabb49cd /ssl | |
parent | 3dcd85139f30625f2e4d072fe2b0f211f76f819c (diff) |
Raise an error on syscall failure in tls_retry_write_records
Record the errno when we get a syscall failure in
tls_retry_write_records
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/record/methods/tls_common.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ssl/record/methods/tls_common.c b/ssl/record/methods/tls_common.c index b7481c071f..d9e017d254 100644 --- a/ssl/record/methods/tls_common.c +++ b/ssl/record/methods/tls_common.c @@ -1914,10 +1914,13 @@ int tls_retry_write_records(OSSL_RECORD_LAYER *rl) else ret = OSSL_RECORD_RETURN_SUCCESS; } else { - if (BIO_should_retry(rl->bio)) + if (BIO_should_retry(rl->bio)) { ret = OSSL_RECORD_RETURN_RETRY; - else + } else { + ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(), + "tls_retry_write_records failure"); ret = OSSL_RECORD_RETURN_FATAL; + } } } else { RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, SSL_R_BIO_NOT_SET); |