diff options
| author | tb <> | 2024-06-26 03:39:49 +0000 |
|---|---|---|
| committer | tb <> | 2024-06-26 03:39:49 +0000 |
| commit | e3ce8d6d4aec7d1155c67d969a9528d19ff8be7d (patch) | |
| tree | 94192b8a99acd93ff564d64d0149a70a448c0c23 /src | |
| parent | e59a7b2ee59c295978f01e92bf5132ee2e8548b6 (diff) | |
| download | openbsd-e3ce8d6d4aec7d1155c67d969a9528d19ff8be7d.tar.gz openbsd-e3ce8d6d4aec7d1155c67d969a9528d19ff8be7d.tar.bz2 openbsd-e3ce8d6d4aec7d1155c67d969a9528d19ff8be7d.zip | |
tls_extension_find(): make output index optional
suggested by jsing
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libssl/ssl_tlsext.c | 5 |
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 | } |
