The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Loading...
Searching...
No Matches
base.c
Go to the documentation of this file.
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
15 */
16
17/**
18 * $Id: b6d004f11ada4ecd520649d0e374f4d3d2c03b53 $
19 *
20 * @file src/lib/tls/base.c
21 * @brief Initialise OpenSSL
22 *
23 * @copyright 2001 hereUare Communications, Inc. (raghud@hereuare.com)
24 * @copyright 2003 Alan DeKok (aland@freeradius.org)
25 * @copyright 2006-2016 The FreeRADIUS server project
26 */
27RCSID("$Id: b6d004f11ada4ecd520649d0e374f4d3d2c03b53 $")
28USES_APPLE_DEPRECATED_API /* OpenSSL API has been deprecated by Apple */
29
30#ifdef WITH_TLS
31#define LOG_PREFIX "tls"
32
33#include "log.h"
34#include "bio.h"
35
36#include <sys/mman.h>
37#include <openssl/conf.h>
38#include <openssl/provider.h>
39
40#include <freeradius-devel/server/base.h>
41#include <freeradius-devel/tls/attrs.h>
42#include <freeradius-devel/tls/base.h>
43#include <freeradius-devel/tls/engine.h>
44#include <freeradius-devel/util/atexit.h>
45#include <freeradius-devel/util/debug.h>
46#include <freeradius-devel/util/math.h>
47#include <freeradius-devel/util/syserror.h>
48
49static uint32_t openssl_instance_count = 0;
50
51/** How big of a stack to allocate for aynsc fibres
52 */
53#define OPENSSL_ASYNC_STACK_SIZE 32768
54
55/** How big of a stack we allocate, taken from the default thread stack size
56 */
57static size_t openssl_stack_size;
58
59/** The context which holds any memory OpenSSL allocates
60 *
61 * This should be used to work around memory leaks in the OpenSSL.
62 */
63_Thread_local TALLOC_CTX *ssl_talloc_ctx;
64
65/** Used to control freeing of thread local OpenSSL resources
66 *
67 */
68static _Thread_local bool *async_pool_init;
69
70static OSSL_PROVIDER *openssl_default_provider = NULL;
71static OSSL_PROVIDER *openssl_legacy_provider = NULL;
72
73static uint32_t tls_instance_count = 0;
74
77fr_dict_t const *dict_tls;
78fr_dict_t const *dict_der;
79
80extern fr_dict_autoload_t tls_dict[];
81fr_dict_autoload_t tls_dict[] = {
82 { .out = &dict_freeradius, .proto = "freeradius" },
83 { .out = &dict_tls, .proto = "tls" },
84 { .out = &dict_der, .proto = "der" },
85 { NULL }
86};
87
90
91/*
92 * Certificate decoding attributes
93 */
111
118
124
126
132
134
135extern fr_dict_attr_autoload_t tls_dict_attr[];
136fr_dict_attr_autoload_t tls_dict_attr[] = {
137 { .out = &attr_allow_session_resumption, .name = "Allow-Session-Resumption", .type = FR_TYPE_BOOL, .dict = &dict_freeradius },
138 { .out = &attr_session_resumed, .name = "EAP-Session-Resumed", .type = FR_TYPE_BOOL, .dict = &dict_freeradius },
139
140 /*
141 * Certificate decoding attributes
142 */
143 { .out = &attr_tls_certificate, .name = "TLS-Certificate", .type = FR_TYPE_TLV, .dict = &dict_freeradius },
144 { .out = &attr_tls_certificate_serial, .name = "TLS-Certificate.Serial", .type = FR_TYPE_OCTETS, .dict = &dict_freeradius },
145 { .out = &attr_tls_certificate_signature, .name = "TLS-Certificate.Signature", .type = FR_TYPE_OCTETS, .dict = &dict_freeradius },
146 { .out = &attr_tls_certificate_signature_algorithm, .name = "TLS-Certificate.Signature-Algorithm", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
147 { .out = &attr_tls_certificate_issuer, .name = "TLS-Certificate.Issuer", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
148 { .out = &attr_tls_certificate_not_before, .name = "TLS-Certificate.Not-Before", .type = FR_TYPE_DATE, .dict = &dict_freeradius },
149 { .out = &attr_tls_certificate_not_after, .name = "TLS-Certificate.Not-After", .type = FR_TYPE_DATE, .dict = &dict_freeradius },
150 { .out = &attr_tls_certificate_subject, .name = "TLS-Certificate.Subject", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
151 { .out = &attr_tls_certificate_common_name, .name = "TLS-Certificate.Common-Name", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
152 { .out = &attr_tls_certificate_subject_alt_name_dns, .name = "TLS-Certificate.Subject-Alt-Name-Dns", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
153 { .out = &attr_tls_certificate_subject_alt_name_email, .name = "TLS-Certificate.Subject-Alt-Name-Email", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
154 { .out = &attr_tls_certificate_subject_alt_name_upn, .name = "TLS-Certificate.Subject-Alt-Name-Upn", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
155 { .out = &attr_tls_certificate_x509v3_extended_key_usage, .name = "TLS-Certificate.X509v3-Extended-Key-Usage", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
156 { .out = &attr_tls_certificate_x509v3_subject_key_identifier, .name = "TLS-Certificate.X509v3-Subject-Key-Identifier", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
157 { .out = &attr_tls_certificate_x509v3_authority_key_identifier, .name = "TLS-Certificate.X509v3-Authority-Key-Identifier", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
158 { .out = &attr_tls_certificate_x509v3_basic_constraints, .name = "TLS-Certificate.X509v3-Basic-Constraints", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
159 { .out = &attr_tls_certificate_x509v3_crl_distribution_points, .name = "TLS-Certificate.X509v3-CRL-Distribution-Points", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
160
161 { .out = &attr_tls_certificate_chain_depth, .name = "TLS-Certificate-Chain-Depth", .type = FR_TYPE_UINT32, .dict = &dict_freeradius },
162 { .out = &attr_tls_client_error_code, .name = "TLS-Client-Error-Code", .type = FR_TYPE_UINT8, .dict = &dict_freeradius },
163 { .out = &attr_tls_ocsp_cert_valid, .name = "TLS-OCSP-Cert-Valid", .type = FR_TYPE_UINT32, .dict = &dict_freeradius },
164 { .out = &attr_tls_ocsp_next_update, .name = "TLS-OCSP-Next-Update", .type = FR_TYPE_UINT32, .dict = &dict_freeradius },
165 { .out = &attr_tls_ocsp_response, .name = "TLS-OCSP-Response", .type = FR_TYPE_OCTETS, .dict = &dict_freeradius },
166 { .out = &attr_tls_psk_identity, .name = "TLS-PSK-Identity", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
167
168 { .out = &attr_tls_session_cert_file, .name = "TLS-Session-Certificate-File", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
169 { .out = &attr_tls_session_require_client_cert, .name = "TLS-Session-Require-Client-Certificate", .type = FR_TYPE_BOOL, .dict = &dict_freeradius },
170 { .out = &attr_tls_session_cipher_suite, .name = "TLS-Session-Cipher-Suite", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
171 { .out = &attr_tls_session_version, .name = "TLS-Session-Version", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
172 { .out = &attr_tls_session_resume_type, .name = "TLS-Session-Resume-Type", .type = FR_TYPE_UINT32, .dict = &dict_freeradius },
173
174 { .out = &attr_module_failure_message, .name = "Module-Failure-Message", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
175
176 /*
177 * Eventually all TLS attributes will be in the TLS dictionary
178 */
179 { .out = &attr_tls_packet_type, .name = "Packet-Type", .type = FR_TYPE_UINT32, .dict = &dict_tls },
180 { .out = &attr_tls_session_data, .name = "Session-Data", .type = FR_TYPE_OCTETS, .dict = &dict_tls },
181 { .out = &attr_tls_session_id, .name = "Session-Id", .type = FR_TYPE_OCTETS, .dict = &dict_tls },
182 { .out = &attr_tls_session_resumed, .name = "Session-Resumed", .type = FR_TYPE_BOOL, .dict = &dict_tls },
183 { .out = &attr_tls_session_ttl, .name = "Session-TTL", .type = FR_TYPE_TIME_DELTA, .dict = &dict_tls },
184
185 { .out = &attr_der_certificate, .name = "Certificate", .type = FR_TYPE_TLV, .dict = &dict_der },
186
187 { NULL }
188};
189
190/*
191 * request types
192 */
199
200/*
201 * response types
202 */
206
207/*
208 * session resumption
209 */
212
213extern fr_dict_enum_autoload_t tls_dict_enum[];
214fr_dict_enum_autoload_t tls_dict_enum[] = {
215 { .out = &enum_tls_packet_type_load_session, .name = "Load-Session", .attr = &attr_tls_packet_type },
216 { .out = &enum_tls_packet_type_store_session, .name = "Store-Session", .attr = &attr_tls_packet_type },
217 { .out = &enum_tls_packet_type_clear_session, .name = "Clear-Session", .attr = &attr_tls_packet_type },
218 { .out = &enum_tls_packet_type_verify_certificate, .name = "Verify-Certificate", .attr = &attr_tls_packet_type },
219 { .out = &enum_tls_packet_type_new_session, .name = "New-Session", .attr = &attr_tls_packet_type },
220 { .out = &enum_tls_packet_type_establish_session, .name = "Establish-Session", .attr = &attr_tls_packet_type },
221
222 { .out = &enum_tls_packet_type_success, .name = "Success", .attr = &attr_tls_packet_type },
223 { .out = &enum_tls_packet_type_failure, .name = "Failure", .attr = &attr_tls_packet_type },
224 { .out = &enum_tls_packet_type_notfound, .name = "Notfound", .attr = &attr_tls_packet_type },
225
226 { .out = &enum_tls_session_resumed_stateful, .name = "stateful", .attr = &attr_tls_session_resume_type },
227 { .out = &enum_tls_session_resumed_stateless, .name = "stateless", .attr = &attr_tls_session_resume_type },
228 { NULL }
229};
230
231/*
232 * Updated by threads.c in the server, and left alone for everyone else.
233 */
234int fr_tls_max_threads = 1;
235
236/** Allocate memory for OpenSSL in the NULL context
237 *
238 * @param len to alloc.
239 * @return realloc.
240 */
241static void *fr_openssl_talloc(size_t len, char const *file, NDEBUG_UNUSED int line)
242{
243 static char const *async_file;
244 void *chunk;
245
246 if (!file) {
247 chunk = talloc_array(ssl_talloc_ctx, uint8_t, len);
248
249#ifndef NDEBUG
250 talloc_set_name(chunk, "fr_openssl_talloc");
251#endif
252 return chunk;
253 }
254
255 /*
256 * Cache the filename pointer for the async_posix.c
257 * source file, so we can figure out when we're
258 * being asked for stack memory.
259 *
260 * This is terrible, we're basically guessing at the
261 * stack size. OpenSSL 3.1.0 will have proper
262 * allocation functions so we can something more
263 * sensible.
264 */
265 if (!async_file) {
266 char const *sep;
267
268 sep = strrchr(file, '/');
269 if (!sep) {
270 sep = file;
271 } else {
272 sep++;
273 }
274 if (strcmp(sep, "async_posix.c") == 0) {
275 async_file = file;
276 alloc_stack:
277 len *= 4;
278 }
279 } else if (file == async_file) goto alloc_stack;
280
281 chunk = talloc_array(ssl_talloc_ctx, uint8_t, len);
282#ifndef NDEBUG
283 talloc_set_name(chunk, "%s:%d", file, line);
284#endif
285 return chunk;
286}
287
288/** Reallocate memory for OpenSSL in the NULL context
289 *
290 * @param old memory to realloc.
291 * @param len to extend to.
292 * @return realloced memory.
293 */
294static void *fr_openssl_talloc_realloc(void *old, size_t len, NDEBUG_UNUSED char const *file, NDEBUG_UNUSED int line)
295{
296 void *chunk;
297
298 chunk = talloc_realloc_size(ssl_talloc_ctx, old, len);
299#ifndef NDEBUG
300 talloc_set_name(chunk, "%s:%d", file, line);
301#endif
302 return chunk;
303}
304
305/** Free memory allocated by OpenSSL
306 *
307 * @param to_free memory to free.
308 */
309#ifdef NDEBUG
310/*
311 * If we're not debugging, use only the filename. Otherwise the
312 * cost of snprintf() is too large.
313 */
314static void fr_openssl_talloc_free(void *to_free, char const *file, UNUSED int line)
315{
316 (void)_talloc_free(to_free, file);
317}
318#else
319static void fr_openssl_talloc_free(void *to_free, char const *file, int line)
320{
321 char buffer[256];
322
323 snprintf(buffer, sizeof(buffer), "%s:%i", file, line);
324 (void)_talloc_free(to_free, buffer);
325}
326#endif
327
328/** Cleanup async pools if the thread exits
329 *
330 */
331static int _openssl_thread_free(void *init)
332{
333 ASYNC_cleanup_thread();
334 return talloc_free(init);
335}
336
337/** Perform thread-specific initialisation for OpenSSL
338 *
339 * Async contexts are what OpenSSL uses to track
340 *
341 * @param[in] async_pool_size_init The initial number of async contexts
342 * we keep in the pool.
343 * @param[in] async_pool_size_max The maximum number of async contexts
344 * we keep in the thread-local pool.
345 * @return
346 * - 0 on success.
347 * - -1 on failure.
348 */
349int fr_openssl_thread_init(size_t async_pool_size_init, size_t async_pool_size_max)
350{
351 /*
352 * Hack to use thread local destructor code
353 */
354 if (!async_pool_init) {
355 bool *init = talloc_zero(NULL, bool);
356
357 if (ASYNC_init_thread(async_pool_size_max, async_pool_size_init) != 1) {
358 fr_tls_log(NULL, "Failed initialising OpenSSL async context pool");
359 return -1;
360 }
361
362 fr_atexit_thread_local(async_pool_init, _openssl_thread_free, init);
363 }
364
365 return 0;
366}
367
368/** Free any memory alloced by libssl
369 *
370 * OpenSSL >= 1.1.0 uses an atexit handler to automatically free
371 * memory. However, we need to call OPENSSL_cleanup manually because
372 * some of the SSL ctx is parented to the main config which will get
373 * freed before the atexit handler, causing a segfault on exit.
374 */
375void fr_openssl_free(void)
376{
377 if (--openssl_instance_count > 0) return;
378
379 fr_tls_log_free();
380
381 fr_tls_bio_free();
382}
383
384static void _openssl_provider_free(void)
385{
386 if (openssl_default_provider && !OSSL_PROVIDER_unload(openssl_default_provider)) {
387 fr_tls_log(NULL, "Failed unloading default provider");
388 }
389 openssl_default_provider = NULL;
390
391 if (openssl_legacy_provider && !OSSL_PROVIDER_unload(openssl_legacy_provider)) {
392 fr_tls_log(NULL, "Failed unloading legacy provider");
393 }
394 openssl_legacy_provider = NULL;
395}
396
397static int fr_openssl_cleanup(UNUSED void *uctx)
398{
399 OPENSSL_cleanup();
400 return 0;
401}
402
403#if OPENSSL_VERSION_NUMBER >= 0x30400000L
404
405static void *fr_openssl_stack_alloc(size_t *len)
406{
407 void *stack;
408
409 /*
410 * Use mmap to sparsely allocate the stack
411 */
412#if defined(__linux__) || defined(__FreeBSD__)
413 stack = mmap(NULL, openssl_stack_size, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE | MAP_STACK, -1, 0);
414#else
415 stack = mmap(NULL, openssl_stack_size, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0);
416#endif
417 if (stack == MAP_FAILED) {
418 fr_tls_log(NULL, "Failed allocating OpenSSL stack: %s", fr_syserror(errno));
419 return NULL;
420 }
421 *len = openssl_stack_size;
422
423 return stack;
424}
425
426static void fr_openssl_stack_free(void *stack)
427{
428 munmap(stack, openssl_stack_size);
429}
430#endif
431
432/** Add all the default ciphers and message digests to our context.
433 *
434 * This should be called exactly once from main, before reading the main config
435 * or initialising any modules.
436 */
437int fr_openssl_init(void)
438{
439 pthread_attr_t tattr;
440
441 if (openssl_instance_count > 0) {
442 openssl_instance_count++;
443 return 0;
444 }
445
446 pthread_attr_init(&tattr);
447 if (pthread_attr_getstacksize(&tattr, &openssl_stack_size) != 0) {
448 fr_tls_log(NULL, "Failed getting stack size");
449 return -1;
450 }
451
452 /*
453 * This will only fail if memory has already been allocated
454 * by OpenSSL.
455 */
456 if (CRYPTO_set_mem_functions(fr_openssl_talloc, fr_openssl_talloc_realloc, fr_openssl_talloc_free) != 1) {
457 fr_tls_log(NULL, "Failed to set OpenSSL memory allocation functions. fr_openssl_init() called too late");
458 return -1;
459 }
460
461 /*
462 * Setup custom memory allocators for allocating greenthread
463 * stacks, so we can add guard pages.
464 */
465#if OPENSSL_VERSION_NUMBER >= 0x30400000L
466 if (ASYNC_set_mem_functions(fr_openssl_stack_alloc, fr_openssl_stack_free) != 1) {
467 fr_tls_log(NULL, "Failed to set OpenSSL async stack allocation functions");
468 return -1;
469 }
470#endif
471
472 /*
473 * NO_ATEXIT has no effect if init is done after
474 * loading providers, and we need to control the
475 * exit handler as it needs to be executed last
476 * after all the EVP_MD ctx have been called, as
477 * they may unload elements of providers once all
478 * the contexts have been cleaned up.
479 */
480 if (OPENSSL_init_ssl(OPENSSL_INIT_NO_ATEXIT | OPENSSL_INIT_LOAD_CONFIG, NULL) != 1) {
481 fr_tls_log(NULL, "Failed calling OPENSSL_init_crypto()");
482 return -1;
483 }
484
485 /*
486 * Load the default provider for most algorithms
487 */
488 openssl_default_provider = OSSL_PROVIDER_load(NULL, "default");
489 if (!openssl_default_provider) {
490 fr_tls_log(NULL, "Failed loading default provider");
491 return -1;
492 }
493
494 /*
495 * Needed for MD4
496 *
497 * https://www.openssl.org/docs/man3.0/man7/migration_guide.html#Legacy-Algorithms
498 */
499 openssl_legacy_provider = OSSL_PROVIDER_load(NULL, "legacy");
500 if (!openssl_legacy_provider) {
501 fr_tls_log(NULL, "Failed loading legacy provider");
502 return -1;
503 }
504
505 /*
506 * It's best to use OpenSSL's cleanup stack
507 * as then everything is cleaned up relative
508 * to the OPENSSL_cleanup() call.
509 */
510 OPENSSL_atexit(_openssl_provider_free);
511
512 /*
513 * SHA256 is in all versions of OpenSSL, but isn't
514 * initialized by default. It's needed for WiMAX
515 * certificates.
516 */
517 EVP_add_digest(EVP_sha256());
518
519 fr_tls_log_init();
520
521 fr_tls_bio_init();
522
523 /*
524 * Use an atexit handler to try and ensure
525 * that OpenSSL gets freed last.
526 *
527 * All EVP_*ctxs need to be freed before we
528 * de-initialise the libraries else we get
529 * crashes (at least with OpenSSL 3.0.1).
530 */
531 fr_atexit_global(fr_openssl_cleanup, NULL);
532
533 openssl_instance_count++;
534
535 return 0;
536}
537
538/** Enable or disable fips mode
539 *
540 * @param[in] enabled If true enable fips mode if false disable fips mode.
541 * @return
542 * - 0 on success.
543 * - -1 on failure
544 */
545int fr_openssl_fips_mode(bool enabled)
546{
547 if (!EVP_set_default_properties(NULL, enabled ? "fips=yes" : "-fips")) {
548 fr_tls_log(NULL, "Failed %s OpenSSL FIPS mode", enabled ? "enabling" : "disabling");
549 return -1;
550 }
551
552 return 0;
553}
554
555/** Load dictionary attributes
556 *
557 * This is a separate function because of ordering issues.
558 * OpenSSL may need to be initialised before anything else
559 * including the dictionary loader.
560 *
561 * fr_openssl_free will unload both the dictionary and the
562 * OpenSSL library.
563 */
564int fr_tls_dict_init(void)
565{
566 if (tls_instance_count > 0) {
567 tls_instance_count++;
568 return 0;
569 }
570
571 tls_instance_count++;
572
573 if (fr_dict_autoload(tls_dict) < 0) {
574 PERROR("Failed initialising protocol library");
575 fail:
576 tls_instance_count--;
577 fr_openssl_free();
578 return -1;
579 }
580
581 if (fr_dict_attr_autoload(tls_dict_attr) < 0) {
582 PERROR("Failed resolving attributes");
583 goto fail;
584 }
585
586 if (fr_dict_enum_autoload(tls_dict_enum) < 0) {
587 PERROR("Failed resolving enums");
588 goto fail;
589 }
590
591 return 0;
592}
593
594void fr_tls_dict_free(void)
595{
596 if (--tls_instance_count > 0) return;
597
598 fr_dict_autofree(tls_dict);
599}
600#endif /* WITH_TLS */
static int const char char buffer[256]
Definition acutest.h:576
int const char * file
Definition acutest.h:702
int const char int line
Definition acutest.h:702
#define fr_atexit_global(_func, _uctx)
Add a free function to the global free list.
Definition atexit.h:59
#define fr_atexit_thread_local(_name, _free, _uctx)
Definition atexit.h:221
static bool init
Definition fuzzer.c:41
#define USES_APPLE_DEPRECATED_API
Definition build.h:472
#define RCSID(id)
Definition build.h:485
#define NDEBUG_UNUSED
Definition build.h:328
#define UNUSED
Definition build.h:317
int fr_dict_enum_autoload(fr_dict_enum_autoload_t const *to_load)
Process a dict_attr_autoload element to load/verify a dictionary attribute.
Definition dict_util.c:4188
#define fr_dict_autofree(_to_free)
Definition dict.h:892
fr_value_box_t const ** out
Enumeration value.
Definition dict.h:276
fr_dict_attr_t const ** out
Where to write a pointer to the resolved fr_dict_attr_t.
Definition dict.h:287
fr_dict_t const ** out
Where to write a pointer to the loaded/resolved fr_dict_t.
Definition dict.h:300
int fr_dict_attr_autoload(fr_dict_attr_autoload_t const *to_load)
Process a dict_attr_autoload element to load/verify a dictionary attribute.
Definition dict_util.c:4227
#define fr_dict_autoload(_to_load)
Definition dict.h:889
Specifies an attribute which must be present for the module to function.
Definition dict.h:286
Specifies a dictionary which must be loaded/loadable for the module to function.
Definition dict.h:299
Specifies a value which must be present for the module to function.
Definition dict.h:275
static fr_dict_t const * dict_freeradius
Definition base.c:37
fr_dict_attr_t const * attr_tls_certificate
Attribute definitions for lib curl.
Definition base.c:36
fr_dict_t const * dict_tls
Definition base.c:79
fr_dict_t const * dict_radius
Definition base.c:78
static fr_dict_attr_t const * attr_module_failure_message
Definition log.c:206
#define PERROR(_fmt,...)
Definition log.h:228
fr_value_box_t const * enum_tls_packet_type_store_session
HIDDEN fr_dict_attr_t const * attr_tls_certificate_subject
HIDDEN fr_dict_attr_t const * attr_tls_certificate_x509v3_extended_key_usage
HIDDEN fr_dict_attr_t const * attr_tls_packet_type
HIDDEN fr_dict_attr_t const * attr_tls_certificate_x509v3_authority_key_identifier
HIDDEN fr_dict_attr_t const * attr_session_resumed
fr_value_box_t const * enum_tls_packet_type_failure
HIDDEN fr_dict_attr_t const * attr_tls_session_resumed
HIDDEN fr_dict_attr_t const * attr_tls_session_version
HIDDEN fr_dict_attr_t const * attr_tls_ocsp_cert_valid
HIDDEN fr_dict_attr_t const * attr_tls_certificate_x509v3_basic_constraints
fr_value_box_t const * enum_tls_packet_type_success
HIDDEN fr_dict_attr_t const * attr_tls_certificate_serial
HIDDEN fr_dict_attr_t const * attr_tls_session_require_client_cert
HIDDEN fr_dict_t const * dict_der
Definition base.c:39
HIDDEN fr_dict_attr_t const * attr_tls_certificate_subject_alt_name_dns
HIDDEN fr_dict_attr_t const * attr_tls_session_ttl
fr_value_box_t const * enum_tls_session_resumed_stateful
HIDDEN fr_dict_attr_t const * attr_tls_session_data
HIDDEN fr_dict_attr_t const * attr_tls_certificate_not_after
HIDDEN fr_dict_attr_t const * attr_tls_certificate_not_before
fr_value_box_t const * enum_tls_packet_type_new_session
HIDDEN fr_dict_attr_t const * attr_tls_certificate_signature_algorithm
HIDDEN fr_dict_attr_t const * attr_tls_client_error_code
fr_value_box_t const * enum_tls_packet_type_load_session
fr_value_box_t const * enum_tls_packet_type_establish_session
HIDDEN fr_dict_attr_t const * attr_tls_certificate_subject_alt_name_upn
HIDDEN fr_dict_attr_t const * attr_tls_ocsp_response
HIDDEN fr_dict_attr_t const * attr_tls_session_id
HIDDEN fr_dict_attr_t const * attr_tls_certificate_x509v3_subject_key_identifier
fr_value_box_t const * enum_tls_packet_type_clear_session
HIDDEN fr_dict_attr_t const * attr_tls_session_cipher_suite
HIDDEN fr_dict_attr_t const * attr_tls_certificate_common_name
HIDDEN fr_dict_attr_t const * attr_tls_psk_identity
HIDDEN fr_dict_attr_t const * attr_tls_certificate_issuer
fr_value_box_t const * enum_tls_session_resumed_stateless
HIDDEN fr_dict_attr_t const * attr_tls_certificate_x509v3_crl_distribution_points
fr_value_box_t const * enum_tls_packet_type_notfound
HIDDEN fr_dict_attr_t const * attr_der_certificate
HIDDEN fr_dict_attr_t const * attr_tls_certificate_signature
HIDDEN fr_dict_attr_t const * attr_tls_session_resume_type
HIDDEN fr_dict_attr_t const * attr_tls_ocsp_next_update
fr_value_box_t const * enum_tls_packet_type_verify_certificate
HIDDEN fr_dict_attr_t const * attr_tls_session_cert_file
HIDDEN fr_dict_attr_t const * attr_tls_certificate_chain_depth
HIDDEN fr_dict_attr_t const * attr_tls_certificate_subject_alt_name_email
HIDDEN fr_dict_attr_t const * attr_allow_session_resumption
talloc_free(reap)
static char * stack[MAX_STACK]
Definition radmin.c:159
@ FR_TYPE_TIME_DELTA
A period of time measured in nanoseconds.
@ FR_TYPE_TLV
Contains nested attributes.
@ FR_TYPE_STRING
String of printable characters.
@ FR_TYPE_DATE
Unix time stamp, always has value >2^31.
@ FR_TYPE_UINT8
8 Bit unsigned integer.
@ FR_TYPE_UINT32
32 Bit unsigned integer.
@ FR_TYPE_BOOL
A truth value.
@ FR_TYPE_OCTETS
Raw octets.
unsigned int uint32_t
unsigned char uint8_t
PUBLIC int snprintf(char *string, size_t length, char *format, va_alist)
Definition snprintf.c:689
char const * fr_syserror(int num)
Guaranteed to be thread-safe version of strerror.
Definition syserror.c:243