The FreeRADIUS server $Id: a4e7f8c94e8038b7627bcf52356b7ed15955c1d7 $
Loading...
Searching...
No Matches
index.h
Go to the documentation of this file.
1#pragma once
2/*
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
16 */
17#ifdef WITH_TLS
18/**
19 * $Id: 1e71cc2d60c5aeab35740532e9713a39d382a5d0 $
20 *
21 * @file lib/tls/tls.h
22 * @brief Structures and prototypes for TLS wrappers
23 *
24 * @copyright 2021 Arran Cudbard-Bell (a.cudbardb@freeradius.org)
25 * @copyright 2026 Network RADIUS SAS (legal@networkradius.com)
26 */
27RCSIDH(index_h, "$Id: 1e71cc2d60c5aeab35740532e9713a39d382a5d0 $")
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33#define FR_TLS_EX_INDEX_EAP_SESSION (10)
34#define FR_TLS_EX_INDEX_CONF (11)
35#define FR_TLS_EX_INDEX_REQUEST (12)
36#define FR_TLS_EX_INDEX_IDENTITY (13)
37#define FR_TLS_EX_INDEX_OCSP_STORE (14)
38#define FR_TLS_EX_INDEX_TLS_SESSION (16)
39
40/** ex_data index for the #fr_tls_session_t which owns an SSL_SESSION
41 *
42 * The indices above are hard-coded, because their information is
43 * never duplicated. However, OpenSSL does duplicate an SSL_SESSION.
44 * A TLS 1.3 client does this for every NewSessionTicket that it
45 * receives. This duplication copies the ex_data, but OpenSSL doesn't
46 * know about the index, and therefore can't duplicate the data.
47 *
48 * Therefore, an index used on an SSL_SESSION has to one assigned by
49 * OpenSSL. The namespace is per object type, so this is a different
50 * index from the ones above even though hold the same pointer.
51 *
52 * Allocated by fr_openssl_init().
53 */
54extern int fr_tls_session_ex_index;
55
56/*
57 * Attached to an SSL_CTX, which OpenSSL never duplicates, so a
58 * hard-coded index is safe here.
59 */
60#define FR_TLS_EX_CTX_INDEX_VERIFY_STORE (20)
61
62#define FR_TLS_EX_INDEX_CURL_CONF (30)
63#ifdef __cplusplus
64}
65#endif
66#endif /* WITH_TLS */
#define RCSIDH(h, id)
Definition build.h:604