diff options
author | jsing <> | 2020-05-11 17:46:46 +0000 |
---|---|---|
committer | jsing <> | 2020-05-11 17:46:46 +0000 |
commit | 7c5ba230fb08375f5c6d8d074afcf25d0fdb429c (patch) | |
tree | b2fa73b5afe4f2d2dd7f646fa971a43e0c549c0f /src/lib/libssl/tls13_legacy.c | |
parent | 7fc47fb1fd67ca9212681c6ffdaa77fe0f2e7332 (diff) | |
download | openbsd-7c5ba230fb08375f5c6d8d074afcf25d0fdb429c.tar.gz openbsd-7c5ba230fb08375f5c6d8d074afcf25d0fdb429c.tar.bz2 openbsd-7c5ba230fb08375f5c6d8d074afcf25d0fdb429c.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.c | 6 |
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 | } |