diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2021-06-08 19:34:45 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2021-06-08 19:34:45 +0000 |
commit | dca0076574e48f3c1e4a4c29eac91df16c97f5b8 (patch) | |
tree | 091d24fea6e884da442c4671ca429c4fe2dc1a44 /lib | |
parent | 9407f30152e9eb2fe9f41848c1349e354b5cd94c (diff) |
Simplify tlsext_ecpf_parse()
The default alert in the tlsext parsing code is a decode_error, so
there's no need for an error path that only sets that alert.
suggested by/ok jsing
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libssl/ssl_tlsext.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/libssl/ssl_tlsext.c b/lib/libssl/ssl_tlsext.c index bd707333628..8cc86d4649f 100644 --- a/lib/libssl/ssl_tlsext.c +++ b/lib/libssl/ssl_tlsext.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_tlsext.c,v 1.93 2021/06/08 17:22:00 tb Exp $ */ +/* $OpenBSD: ssl_tlsext.c,v 1.94 2021/06/08 19:34:44 tb Exp $ */ /* * Copyright (c) 2016, 2017, 2019 Joel Sing <jsing@openbsd.org> * Copyright (c) 2017 Doug Hogan <doug@openbsd.org> @@ -353,11 +353,11 @@ tlsext_ecpf_parse(SSL *s, uint16_t msg_type, CBS *cbs, int *alert) CBS ecpf; if (!CBS_get_u8_length_prefixed(cbs, &ecpf)) - goto err; + return 0; if (CBS_len(&ecpf) == 0) - goto err; + return 0; if (CBS_len(cbs) != 0) - goto err; + return 0; /* Must contain uncompressed (0) - RFC 8422, section 5.1.2. */ if (!CBS_contains_zero_byte(&ecpf)) { @@ -375,10 +375,6 @@ tlsext_ecpf_parse(SSL *s, uint16_t msg_type, CBS *cbs, int *alert) } return 1; - - err: - *alert = SSL_AD_DECODE_ERROR; - return 0; } int |