summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2023-04-27 10:50:37 +0000
committertb <>2023-04-27 10:50:37 +0000
commit2d539e19388081b9799e838a1d5d652f57b46430 (patch)
treef040caf7a72334cdf9567c212dc32e0d79703512 /src
parentd6e28f1d859837503d55b51d2b5577ad78845f24 (diff)
downloadopenbsd-2d539e19388081b9799e838a1d5d652f57b46430.tar.gz
openbsd-2d539e19388081b9799e838a1d5d652f57b46430.tar.bz2
openbsd-2d539e19388081b9799e838a1d5d652f57b46430.zip
ssl_tlsext.c: Add an accessor for the tls extension type.
Needed for the tlsexttest.c ok jsing
Diffstat (limited to 'src')
-rw-r--r--src/lib/libssl/ssl_tlsext.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_tlsext.c b/src/lib/libssl/ssl_tlsext.c
index bfceadfe96..7b843c6fe6 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.135 2023/04/25 07:50:38 tb Exp $ */ 1/* $OpenBSD: ssl_tlsext.c,v 1.136 2023/04/27 10:50:37 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>
@@ -2207,6 +2207,12 @@ static const struct tls_extension tls_extensions[] = {
2207/* Ensure that extensions fit in a uint32_t bitmask. */ 2207/* Ensure that extensions fit in a uint32_t bitmask. */
2208CTASSERT(N_TLS_EXTENSIONS <= (sizeof(uint32_t) * 8)); 2208CTASSERT(N_TLS_EXTENSIONS <= (sizeof(uint32_t) * 8));
2209 2209
2210uint16_t
2211tls_extension_type(const struct tls_extension *extension)
2212{
2213 return extension->type;
2214}
2215
2210const struct tls_extension * 2216const struct tls_extension *
2211tls_extension_find(uint16_t type, size_t *tls_extensions_idx) 2217tls_extension_find(uint16_t type, size_t *tls_extensions_idx)
2212{ 2218{