summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2024-06-26 03:39:49 +0000
committertb <>2024-06-26 03:39:49 +0000
commit469e7cab085b04ca8369e8d161c47318845b5970 (patch)
tree94192b8a99acd93ff564d64d0149a70a448c0c23 /src
parentdd9ce93fac0548a1fd292d2d756a968f576f40de (diff)
downloadopenbsd-469e7cab085b04ca8369e8d161c47318845b5970.tar.gz
openbsd-469e7cab085b04ca8369e8d161c47318845b5970.tar.bz2
openbsd-469e7cab085b04ca8369e8d161c47318845b5970.zip
tls_extension_find(): make output index optional
suggested by jsing
Diffstat (limited to 'src')
-rw-r--r--src/lib/libssl/ssl_tlsext.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libssl/ssl_tlsext.c b/src/lib/libssl/ssl_tlsext.c
index 64f82b7dfb..95174dc805 100644
--- a/src/lib/libssl/ssl_tlsext.c
+++ b/src/lib/libssl/ssl_tlsext.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_tlsext.c,v 1.151 2024/06/25 05:46:48 tb Exp $ */ 1/* $OpenBSD: ssl_tlsext.c,v 1.152 2024/06/26 03:39:49 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2016, 2017, 2019 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2016, 2017, 2019 Joel Sing <jsing@openbsd.org>
4 * Copyright (c) 2017 Doug Hogan <doug@openbsd.org> 4 * Copyright (c) 2017 Doug Hogan <doug@openbsd.org>
@@ -2368,7 +2368,8 @@ tls_extension_find(uint16_t type, size_t *tls_extensions_idx)
2368 2368
2369 for (i = 0; i < N_TLS_EXTENSIONS; i++) { 2369 for (i = 0; i < N_TLS_EXTENSIONS; i++) {
2370 if (tls_extensions[i].type == type) { 2370 if (tls_extensions[i].type == type) {
2371 *tls_extensions_idx = i; 2371 if (tls_extensions_idx != NULL)
2372 *tls_extensions_idx = i;
2372 return &tls_extensions[i]; 2373 return &tls_extensions[i];
2373 } 2374 }
2374 } 2375 }