diff options
Diffstat (limited to 'src/lib/libssl/tls13_client.c')
-rw-r--r-- | src/lib/libssl/tls13_client.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/libssl/tls13_client.c b/src/lib/libssl/tls13_client.c index 20b3038b93..737a1015a5 100644 --- a/src/lib/libssl/tls13_client.c +++ b/src/lib/libssl/tls13_client.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls13_client.c,v 1.32 2020/01/23 11:06:59 beck Exp $ */ | 1 | /* $OpenBSD: tls13_client.c,v 1.33 2020/01/25 09:20:56 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 | * |
@@ -209,6 +209,9 @@ tls13_client_hello_send(struct tls13_ctx *ctx, CBB *cbb) | |||
209 | if (ctx->hs->min_version < TLS1_2_VERSION) | 209 | if (ctx->hs->min_version < TLS1_2_VERSION) |
210 | tls13_record_layer_set_legacy_version(ctx->rl, TLS1_VERSION); | 210 | tls13_record_layer_set_legacy_version(ctx->rl, TLS1_VERSION); |
211 | 211 | ||
212 | /* We may receive a pre-TLSv1.3 alert in response to the client hello. */ | ||
213 | tls13_record_layer_allow_legacy_alerts(ctx->rl, 1); | ||
214 | |||
212 | if (!tls13_client_hello_build(ctx, cbb)) | 215 | if (!tls13_client_hello_build(ctx, cbb)) |
213 | return 0; | 216 | return 0; |
214 | 217 | ||
@@ -306,6 +309,9 @@ tls13_server_hello_process(struct tls13_ctx *ctx, CBS *cbs) | |||
306 | return tls13_use_legacy_client(ctx); | 309 | return tls13_use_legacy_client(ctx); |
307 | } | 310 | } |
308 | 311 | ||
312 | /* From here on in we know we are doing TLSv1.3. */ | ||
313 | tls13_record_layer_allow_legacy_alerts(ctx->rl, 0); | ||
314 | |||
309 | if (!tlsext_client_parse(s, cbs, &alert_desc, SSL_TLSEXT_MSG_SH)) { | 315 | if (!tlsext_client_parse(s, cbs, &alert_desc, SSL_TLSEXT_MSG_SH)) { |
310 | ctx->alert = alert_desc; | 316 | ctx->alert = alert_desc; |
311 | goto err; | 317 | goto err; |