From 4d7879d4bf31ef9b7cdd0c2dbcb6dfce997239b1 Mon Sep 17 00:00:00 2001 From: tb Date: Fri, 22 Jul 2022 14:53:07 +0000 Subject: [PATCH] Simplify tls13_server_encrypted_extensions_recv We can rely on tlsext_client_parse() to set the alert, so no need to do this in the error path. ok jsing --- lib/libssl/tls13_client.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/libssl/tls13_client.c b/lib/libssl/tls13_client.c index fb2dd69eb22..cc01329e515 100644 --- a/lib/libssl/tls13_client.c +++ b/lib/libssl/tls13_client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls13_client.c,v 1.95 2022/07/02 16:00:12 tb Exp $ */ +/* $OpenBSD: tls13_client.c,v 1.96 2022/07/22 14:53:07 tb Exp $ */ /* * Copyright (c) 2018, 2019 Joel Sing * @@ -504,16 +504,10 @@ tls13_server_encrypted_extensions_recv(struct tls13_ctx *ctx, CBS *cbs) if (!tlsext_client_parse(ctx->ssl, SSL_TLSEXT_MSG_EE, cbs, &alert_desc)) { ctx->alert = alert_desc; - goto err; + return 0; } return 1; - - err: - if (ctx->alert == 0) - ctx->alert = TLS13_ALERT_DECODE_ERROR; - - return 0; } int -- 2.20.1