From: tb Date: Thu, 27 Apr 2023 10:50:37 +0000 (+0000) Subject: ssl_tlsext.c: Add an accessor for the tls extension type. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=71517d29f840359c52f6c40760c8b4309af02200;p=openbsd ssl_tlsext.c: Add an accessor for the tls extension type. Needed for the tlsexttest.c ok jsing --- 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 * Copyright (c) 2017 Doug Hogan @@ -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) {