diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libssl/tls13_quic.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/lib/libssl/tls13_quic.c b/src/lib/libssl/tls13_quic.c index e5c386ea36..656af6fe6b 100644 --- a/src/lib/libssl/tls13_quic.c +++ b/src/lib/libssl/tls13_quic.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls13_quic.c,v 1.7 2022/11/26 16:08:56 tb Exp $ */ | 1 | /* $OpenBSD: tls13_quic.c,v 1.8 2024/09/09 03:55:55 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2022 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2022 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -131,6 +131,8 @@ tls13_quic_alert_send_cb(int alert_desc, void *arg) | |||
131 | { | 131 | { |
132 | struct tls13_ctx *ctx = arg; | 132 | struct tls13_ctx *ctx = arg; |
133 | SSL *ssl = ctx->ssl; | 133 | SSL *ssl = ctx->ssl; |
134 | uint8_t alert_level = TLS13_ALERT_LEVEL_FATAL; | ||
135 | int ret = TLS13_IO_ALERT; | ||
134 | 136 | ||
135 | if (!ssl->quic_method->send_alert(ssl, ctx->hs->tls13.quic_write_level, | 137 | if (!ssl->quic_method->send_alert(ssl, ctx->hs->tls13.quic_write_level, |
136 | alert_desc)) { | 138 | alert_desc)) { |
@@ -138,7 +140,15 @@ tls13_quic_alert_send_cb(int alert_desc, void *arg) | |||
138 | return TLS13_IO_FAILURE; | 140 | return TLS13_IO_FAILURE; |
139 | } | 141 | } |
140 | 142 | ||
141 | return TLS13_IO_SUCCESS; | 143 | if (alert_desc == TLS13_ALERT_CLOSE_NOTIFY || |
144 | alert_desc == TLS13_ALERT_USER_CANCELED) { | ||
145 | alert_level = TLS13_ALERT_LEVEL_WARNING; | ||
146 | ret = TLS13_IO_SUCCESS; | ||
147 | } | ||
148 | |||
149 | tls13_record_layer_alert_sent(ctx->rl, alert_level, alert_desc); | ||
150 | |||
151 | return ret; | ||
142 | } | 152 | } |
143 | 153 | ||
144 | static const struct tls13_record_layer_callbacks quic_rl_callbacks = { | 154 | static const struct tls13_record_layer_callbacks quic_rl_callbacks = { |