openssl/0010-Avoid-sending-alert-after-shutdown.patch
Sahana Prasad ef962954ab Update to alpha 16 version
Avoids sending alert after orderly connection close
Resolves: rhbz#1952901, rhbz#1903209

Signed-off-by: Sahana Prasad <sahana@redhat.com>
2021-05-17 11:37:19 +02:00

13 lines
677 B
Diff

diff -up openssl-3.0.0-alpha16/ssl/s3_msg.c.shut-down openssl-3.0.0-alpha16/ssl/s3_msg.c
--- openssl-3.0.0-alpha16/ssl/s3_msg.c.shut-down 2021-05-17 11:11:11.050702699 +0200
+++ openssl-3.0.0-alpha16/ssl/s3_msg.c 2021-05-17 11:12:37.741526784 +0200
@@ -52,6 +52,8 @@ int ssl3_send_alert(SSL *s, int level, i
* 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);