Skip to content

Commit

Permalink
Don't return SSL_ERROR_SYSCALL for EOF
Browse files Browse the repository at this point in the history
  • Loading branch information
WillChilds-Klein committed Dec 13, 2023
1 parent 7779551 commit 6065eed
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions ssl/ssl_lib.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1374,14 +1374,8 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
return SSL_ERROR_SSL;
}

if (ret_code == 0) {
if (ssl->s3->rwstate == SSL_ERROR_ZERO_RETURN) {
return SSL_ERROR_ZERO_RETURN;
}
// An EOF was observed which violates the protocol, and the underlying
// transport does not participate in the error queue. Bubble up to the
// caller.
return SSL_ERROR_SYSCALL;
if (ret_code == 0 && ssl->s3->rwstate == SSL_ERROR_ZERO_RETURN) {
return SSL_ERROR_ZERO_RETURN;
}

switch (ssl->s3->rwstate) {
Expand Down

0 comments on commit 6065eed

Please sign in to comment.