Skip to content

Commit

Permalink
Raise an error on syscall failure in tls_retry_write_records
Browse files Browse the repository at this point in the history
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 #23723)
  • Loading branch information
nhorman authored and t8m committed Apr 26, 2024
1 parent 3dcd851 commit 933f57d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ssl/record/methods/tls_common.c
Expand Up @@ -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);
Expand Down

0 comments on commit 933f57d

Please sign in to comment.