diff options
| author | tb <> | 2022-07-22 14:53:07 +0000 |
|---|---|---|
| committer | tb <> | 2022-07-22 14:53:07 +0000 |
| commit | eb96f22ae583afb63244c20ef4b563fcdd868d57 (patch) | |
| tree | 425605fab9a4b960dbe93ad025f04005d5ea2b0b /src | |
| parent | 2cbb701c400c6c504c9ff1ca44de02091de6dbf3 (diff) | |
| download | openbsd-eb96f22ae583afb63244c20ef4b563fcdd868d57.tar.gz openbsd-eb96f22ae583afb63244c20ef4b563fcdd868d57.tar.bz2 openbsd-eb96f22ae583afb63244c20ef4b563fcdd868d57.zip | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libssl/tls13_client.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/lib/libssl/tls13_client.c b/src/lib/libssl/tls13_client.c index fb2dd69eb2..cc01329e51 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.95 2022/07/02 16:00:12 tb Exp $ */ | 1 | /* $OpenBSD: tls13_client.c,v 1.96 2022/07/22 14:53:07 tb 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 | * |
| @@ -504,16 +504,10 @@ tls13_server_encrypted_extensions_recv(struct tls13_ctx *ctx, CBS *cbs) | |||
| 504 | 504 | ||
| 505 | if (!tlsext_client_parse(ctx->ssl, SSL_TLSEXT_MSG_EE, cbs, &alert_desc)) { | 505 | if (!tlsext_client_parse(ctx->ssl, SSL_TLSEXT_MSG_EE, cbs, &alert_desc)) { |
| 506 | ctx->alert = alert_desc; | 506 | ctx->alert = alert_desc; |
| 507 | goto err; | 507 | return 0; |
| 508 | } | 508 | } |
| 509 | 509 | ||
| 510 | return 1; | 510 | return 1; |
| 511 | |||
| 512 | err: | ||
| 513 | if (ctx->alert == 0) | ||
| 514 | ctx->alert = TLS13_ALERT_DECODE_ERROR; | ||
| 515 | |||
| 516 | return 0; | ||
| 517 | } | 511 | } |
| 518 | 512 | ||
| 519 | int | 513 | int |
