Skip to content

Commit

Permalink
Avoid sending alerts after shutdown
Browse files Browse the repository at this point in the history
Fixes openssl#11388

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from openssl#15159)
  • Loading branch information
beldmit committed May 6, 2021
1 parent 021521a commit 22d1138
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ssl/s3_msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ int ssl3_send_alert(SSL *s, int level, int desc)
* protocol_version alerts */
if (desc < 0)
return -1;
if (s->shutdown & SSL_SENT_SHUTDOWN && desc != SSL_AD_CLOSE_NOTIFY)
return -1;
/* If a fatal one, remove from cache */
if ((level == SSL3_AL_FATAL) && (s->session != NULL))
SSL_CTX_remove_session(s->session_ctx, s->session);
Expand Down

0 comments on commit 22d1138

Please sign in to comment.