diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2024-06-26 03:39:50 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2024-06-26 03:39:50 +0000 |
commit | 7a00f511d4f15728a551bfdae4703a42d979a269 (patch) | |
tree | ec146740e4e72029083ea3573514a4584b72b758 /lib/libssl | |
parent | dcedd4374abb6f3456f8d6bc995601732ffaacf4 (diff) |
tls_extension_find(): make output index optional
suggested by jsing
Diffstat (limited to 'lib/libssl')
-rw-r--r-- | lib/libssl/ssl_tlsext.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libssl/ssl_tlsext.c b/lib/libssl/ssl_tlsext.c index 64f82b7dfb5..95174dc805d 100644 --- a/lib/libssl/ssl_tlsext.c +++ b/lib/libssl/ssl_tlsext.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_tlsext.c,v 1.151 2024/06/25 05:46:48 tb Exp $ */ +/* $OpenBSD: ssl_tlsext.c,v 1.152 2024/06/26 03:39:49 tb Exp $ */ /* * Copyright (c) 2016, 2017, 2019 Joel Sing <jsing@openbsd.org> * Copyright (c) 2017 Doug Hogan <doug@openbsd.org> @@ -2368,7 +2368,8 @@ tls_extension_find(uint16_t type, size_t *tls_extensions_idx) for (i = 0; i < N_TLS_EXTENSIONS; i++) { if (tls_extensions[i].type == type) { - *tls_extensions_idx = i; + if (tls_extensions_idx != NULL) + *tls_extensions_idx = i; return &tls_extensions[i]; } } |