mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-21 13:16:57 +00:00
MEDIUM: ssl: handle the SSL_ERROR_ZERO_RETURN during the handshake
During a SSL_do_handshake(), SSL_ERROR_ZERO_RETURN can be returned in case the remote peer sent a close_notify alert. Previously this would set the connection error to CO_ER_SSL_HANDSHAKE, this patch sets it to CO_ER_SSL_ABORT to have a more acurate error.
This commit is contained in:
parent
1231810963
commit
e8e5762389
@ -5984,6 +5984,14 @@ check_error:
|
||||
#endif /* BoringSSL or LibreSSL */
|
||||
}
|
||||
goto out_error;
|
||||
|
||||
} else if (ret == SSL_ERROR_ZERO_RETURN) {
|
||||
/* The peer has closed the SSL session for writing by
|
||||
* sending a close_notify alert */
|
||||
conn_ctrl_drain(conn);
|
||||
conn->err_code = CO_ER_SSL_ABORT;
|
||||
goto out_error;
|
||||
|
||||
}
|
||||
else {
|
||||
/* Fail on all other handshake errors */
|
||||
|
Loading…
Reference in New Issue
Block a user