diff options
author | Dmitry Belyavskiy <beldmit@gmail.com> | 2021-05-05 14:29:28 +0200 |
---|---|---|
committer | Dmitry Belyavskiy <beldmit@gmail.com> | 2021-05-06 17:07:11 +0200 |
commit | 22d1138fe2fde9a16e80b81de1d848ae6fa879ef (patch) | |
tree | 0531a8e08f03cf70067203c92a50c93a133fc532 /ssl | |
parent | 021521aa91d7b1a47f3c3b704f1cc39f169b2e5b (diff) |
Avoid sending alerts after shutdown
Fixes #11388
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15159)
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/s3_msg.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ssl/s3_msg.c b/ssl/s3_msg.c index 066623d5fb..4b0906820e 100644 --- a/ssl/s3_msg.c +++ b/ssl/s3_msg.c @@ -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); |