summaryrefslogtreecommitdiff
path: root/src/lib/libssl/tls13_legacy.c
diff options
context:
space:
mode:
authorjsing <>2020-05-11 17:46:46 +0000
committerjsing <>2020-05-11 17:46:46 +0000
commitb7219fe30ee8ebb60e558faa30efe4806616d3a0 (patch)
treeb2fa73b5afe4f2d2dd7f646fa971a43e0c549c0f /src/lib/libssl/tls13_legacy.c
parente8ee587ebd9067593183cd7937f0693b858d1c07 (diff)
downloadopenbsd-b7219fe30ee8ebb60e558faa30efe4806616d3a0.tar.gz
openbsd-b7219fe30ee8ebb60e558faa30efe4806616d3a0.tar.bz2
openbsd-b7219fe30ee8ebb60e558faa30efe4806616d3a0.zip
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@
Diffstat (limited to 'src/lib/libssl/tls13_legacy.c')
-rw-r--r--src/lib/libssl/tls13_legacy.c6
1 files changed, 3 insertions, 3 deletions
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 @@
1/* $OpenBSD: tls13_legacy.c,v 1.5 2020/05/10 16:59:51 jsing Exp $ */ 1/* $OpenBSD: tls13_legacy.c,v 1.6 2020/05/11 17:46:46 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -487,8 +487,8 @@ tls13_legacy_shutdown(SSL *ssl)
487 } 487 }
488 488
489 /* Send close notify. */ 489 /* Send close notify. */
490 if (!ctx->close_notify_sent) { 490 if (!(ssl->internal->shutdown & SSL_SENT_SHUTDOWN)) {
491 ctx->close_notify_sent = 1; 491 ssl->internal->shutdown |= SSL_SENT_SHUTDOWN;
492 if ((ret = tls13_send_alert(ctx->rl, TLS13_ALERT_CLOSE_NOTIFY)) < 0) 492 if ((ret = tls13_send_alert(ctx->rl, TLS13_ALERT_CLOSE_NOTIFY)) < 0)
493 return tls13_legacy_return_code(ssl, ret); 493 return tls13_legacy_return_code(ssl, ret);
494 } 494 }