diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2023-04-27 10:50:38 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2023-04-27 10:50:38 +0000 |
commit | dabd56541fc2622152350259529f31ffd9c3391e (patch) | |
tree | 0cb4ffb47df794bea143ed75bcfbe71c00e318a4 | |
parent | 10f1fdd3f8204471e27c856ea714f8a29f601711 (diff) |
ssl_tlsext.c: Add an accessor for the tls extension type.
Needed for the tlsexttest.c
ok jsing
-rw-r--r-- | lib/libssl/ssl_tlsext.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/libssl/ssl_tlsext.c b/lib/libssl/ssl_tlsext.c index bfceadfe960..7b843c6fe61 100644 --- a/lib/libssl/ssl_tlsext.c +++ b/lib/libssl/ssl_tlsext.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_tlsext.c,v 1.135 2023/04/25 07:50:38 tb Exp $ */ +/* $OpenBSD: ssl_tlsext.c,v 1.136 2023/04/27 10:50:37 tb Exp $ */ /* * Copyright (c) 2016, 2017, 2019 Joel Sing <jsing@openbsd.org> * Copyright (c) 2017 Doug Hogan <doug@openbsd.org> @@ -2207,6 +2207,12 @@ static const struct tls_extension tls_extensions[] = { /* Ensure that extensions fit in a uint32_t bitmask. */ CTASSERT(N_TLS_EXTENSIONS <= (sizeof(uint32_t) * 8)); +uint16_t +tls_extension_type(const struct tls_extension *extension) +{ + return extension->type; +} + const struct tls_extension * tls_extension_find(uint16_t type, size_t *tls_extensions_idx) { |