From 7c5ba230fb08375f5c6d8d074afcf25d0fdb429c Mon Sep 17 00:00:00 2001 From: jsing <> Date: Mon, 11 May 2020 17:46:46 +0000 Subject: Provide an alert sent record layer callback. Use this to push an error on to the SSL error stack so that we report the details of the alert that we sent, rather than failing with an unknown error. ok tb@ --- src/lib/libssl/tls13_legacy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/libssl/tls13_legacy.c') diff --git a/src/lib/libssl/tls13_legacy.c b/src/lib/libssl/tls13_legacy.c index 8f8259344f..af1ad2169d 100644 --- a/src/lib/libssl/tls13_legacy.c +++ b/src/lib/libssl/tls13_legacy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls13_legacy.c,v 1.5 2020/05/10 16:59:51 jsing Exp $ */ +/* $OpenBSD: tls13_legacy.c,v 1.6 2020/05/11 17:46:46 jsing Exp $ */ /* * Copyright (c) 2018, 2019 Joel Sing * @@ -487,8 +487,8 @@ tls13_legacy_shutdown(SSL *ssl) } /* Send close notify. */ - if (!ctx->close_notify_sent) { - ctx->close_notify_sent = 1; + if (!(ssl->internal->shutdown & SSL_SENT_SHUTDOWN)) { + ssl->internal->shutdown |= SSL_SENT_SHUTDOWN; if ((ret = tls13_send_alert(ctx->rl, TLS13_ALERT_CLOSE_NOTIFY)) < 0) return tls13_legacy_return_code(ssl, ret); } -- cgit v1.2.3-55-g6feb