The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
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: dd951b942c4694a9f3ece3dcf25bc4b7518fb7cd $
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  */
27 RCSID("$Id: dd951b942c4694a9f3ece3dcf25bc4b7518fb7cd $")
28 USES_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 <openssl/conf.h>
37 #if OPENSSL_VERSION_NUMBER >= 0x30000000L
38 # include <openssl/provider.h>
39 #endif
40 
41 #include <freeradius-devel/server/base.h>
42 #include <freeradius-devel/tls/attrs.h>
43 #include <freeradius-devel/tls/base.h>
44 #include <freeradius-devel/tls/engine.h>
45 #include <freeradius-devel/util/atexit.h>
46 #include <freeradius-devel/util/debug.h>
47 
48 static uint32_t openssl_instance_count = 0;
49 
50 /** The context which holds any memory OpenSSL allocates
51  *
52  * This should be used to work around memory leaks in the OpenSSL.
53  */
54 _Thread_local TALLOC_CTX *ssl_talloc_ctx;
55 
56 /** Used to control freeing of thread local OpenSSL resources
57  *
58  */
59 static _Thread_local bool *async_pool_init;
60 
61 #if OPENSSL_VERSION_NUMBER >= 0x30000000L
62 static OSSL_PROVIDER *openssl_default_provider = NULL;
63 static OSSL_PROVIDER *openssl_legacy_provider = NULL;
64 #endif
65 
66 static uint32_t tls_instance_count = 0;
67 
69 fr_dict_t const *dict_radius;
70 fr_dict_t const *dict_tls;
71 
72 extern fr_dict_autoload_t tls_dict[];
73 fr_dict_autoload_t tls_dict[] = {
74  { .out = &dict_freeradius, .proto = "freeradius" },
75  { .out = &dict_radius, .proto = "radius" },
76  { .out = &dict_tls, .proto = "tls" },
77  { NULL }
78 };
79 
82 
83 /*
84  * Certificate decoding attributes
85  */
102 
108 
113 
115 
121 
122 extern fr_dict_attr_autoload_t tls_dict_attr[];
123 fr_dict_attr_autoload_t tls_dict_attr[] = {
124  { .out = &attr_allow_session_resumption, .name = "Allow-Session-Resumption", .type = FR_TYPE_BOOL, .dict = &dict_freeradius },
125  { .out = &attr_session_resumed, .name = "EAP-Session-Resumed", .type = FR_TYPE_BOOL, .dict = &dict_freeradius },
126 
127  /*
128  * Certificate decoding attributes
129  */
130  { .out = &attr_tls_certificate, .name = "TLS-Certificate", .type = FR_TYPE_TLV, .dict = &dict_freeradius },
131  { .out = &attr_tls_certificate_serial, .name = "TLS-Certificate.Serial", .type = FR_TYPE_OCTETS, .dict = &dict_freeradius },
132  { .out = &attr_tls_certificate_signature, .name = "TLS-Certificate.Signature", .type = FR_TYPE_OCTETS, .dict = &dict_freeradius },
133  { .out = &attr_tls_certificate_signature_algorithm, .name = "TLS-Certificate.Signature-Algorithm", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
134  { .out = &attr_tls_certificate_issuer, .name = "TLS-Certificate.Issuer", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
135  { .out = &attr_tls_certificate_not_before, .name = "TLS-Certificate.Not-Before", .type = FR_TYPE_DATE, .dict = &dict_freeradius },
136  { .out = &attr_tls_certificate_not_after, .name = "TLS-Certificate.Not-After", .type = FR_TYPE_DATE, .dict = &dict_freeradius },
137  { .out = &attr_tls_certificate_subject, .name = "TLS-Certificate.Subject", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
138  { .out = &attr_tls_certificate_common_name, .name = "TLS-Certificate.Common-Name", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
139  { .out = &attr_tls_certificate_subject_alt_name_dns, .name = "TLS-Certificate.Subject-Alt-Name-Dns", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
140  { .out = &attr_tls_certificate_subject_alt_name_email, .name = "TLS-Certificate.Subject-Alt-Name-Email", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
141  { .out = &attr_tls_certificate_subject_alt_name_upn, .name = "TLS-Certificate.Subject-Alt-Name-Upn", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
142  { .out = &attr_tls_certificate_x509v3_extended_key_usage, .name = "TLS-Certificate.X509v3-Extended-Key-Usage", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
143  { .out = &attr_tls_certificate_x509v3_subject_key_identifier, .name = "TLS-Certificate.X509v3-Subject-Key-Identifier", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
144  { .out = &attr_tls_certificate_x509v3_authority_key_identifier, .name = "TLS-Certificate.X509v3-Authority-Key-Identifier", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
145  { .out = &attr_tls_certificate_x509v3_basic_constraints, .name = "TLS-Certificate.X509v3-Basic-Constraints", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
146 
147  { .out = &attr_tls_client_error_code, .name = "TLS-Client-Error-Code", .type = FR_TYPE_UINT8, .dict = &dict_freeradius },
148  { .out = &attr_tls_ocsp_cert_valid, .name = "TLS-OCSP-Cert-Valid", .type = FR_TYPE_UINT32, .dict = &dict_freeradius },
149  { .out = &attr_tls_ocsp_next_update, .name = "TLS-OCSP-Next-Update", .type = FR_TYPE_UINT32, .dict = &dict_freeradius },
150  { .out = &attr_tls_ocsp_response, .name = "TLS-OCSP-Response", .type = FR_TYPE_OCTETS, .dict = &dict_freeradius },
151  { .out = &attr_tls_psk_identity, .name = "TLS-PSK-Identity", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
152 
153  { .out = &attr_tls_session_cert_file, .name = "TLS-Session-Certificate-File", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
154  { .out = &attr_tls_session_require_client_cert, .name = "TLS-Session-Require-Client-Certificate", .type = FR_TYPE_BOOL, .dict = &dict_freeradius },
155  { .out = &attr_tls_session_cipher_suite, .name = "TLS-Session-Cipher-Suite", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
156  { .out = &attr_tls_session_version, .name = "TLS-Session-Version", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
157 
158  { .out = &attr_framed_mtu, .name = "Framed-MTU", .type = FR_TYPE_UINT32, .dict = &dict_radius },
159 
160  /*
161  * Eventually all TLS attributes will be in the TLS dictionary
162  */
163  { .out = &attr_tls_packet_type, .name = "Packet-Type", .type = FR_TYPE_UINT32, .dict = &dict_tls },
164  { .out = &attr_tls_session_data, .name = "Session-Data", .type = FR_TYPE_OCTETS, .dict = &dict_tls },
165  { .out = &attr_tls_session_id, .name = "Session-Id", .type = FR_TYPE_OCTETS, .dict = &dict_tls },
166  { .out = &attr_tls_session_resumed, .name = "Session-Resumed", .type = FR_TYPE_BOOL, .dict = &dict_tls },
167  { .out = &attr_tls_session_ttl, .name = "Session-TTL", .type = FR_TYPE_TIME_DELTA, .dict = &dict_tls },
168  { NULL }
169 };
170 
171 /*
172  * request types
173  */
178 
179 /*
180  * response types
181  */
185 
186 extern fr_dict_enum_autoload_t tls_dict_enum[];
187 fr_dict_enum_autoload_t tls_dict_enum[] = {
188  { .out = &enum_tls_packet_type_load_session, .name = "Load-Session", .attr = &attr_tls_packet_type },
189  { .out = &enum_tls_packet_type_store_session, .name = "Store-Session", .attr = &attr_tls_packet_type },
190  { .out = &enum_tls_packet_type_clear_session, .name = "Clear-Session", .attr = &attr_tls_packet_type },
191  { .out = &enum_tls_packet_type_verify_certificate, .name = "Verify-Certificate", .attr = &attr_tls_packet_type },
192 
193  { .out = &enum_tls_packet_type_success, .name = "Success", .attr = &attr_tls_packet_type },
194  { .out = &enum_tls_packet_type_failure, .name = "Failure", .attr = &attr_tls_packet_type },
195  { .out = &enum_tls_packet_type_notfound, .name = "Notfound", .attr = &attr_tls_packet_type },
196  { NULL }
197 };
198 
199 /*
200  * Updated by threads.c in the server, and left alone for everyone else.
201  */
202 int fr_tls_max_threads = 1;
203 
204 /** Allocate memory for OpenSSL in the NULL context
205  *
206  * @param len to alloc.
207  * @return realloc.
208  */
209 static void *fr_openssl_talloc(size_t len, char const *file, NDEBUG_UNUSED int line)
210 {
211  static char const *async_file;
212  void *chunk;
213 
214  if (!file) {
215  chunk = talloc_array(ssl_talloc_ctx, uint8_t, len);
216 
217 #ifndef NDEBUG
218  talloc_set_name(chunk, "fr_openssl_talloc");
219 #endif
220  return chunk;
221  }
222 
223  /*
224  * Cache the filename pointer for the async_posix.c
225  * source file, so we can figure out when we're
226  * being asked for stack memory.
227  *
228  * This is terrible, we're basically guessing at the
229  * stack size. OpenSSL 3.1.0 will have proper
230  * allocation functions so we can something more
231  * sensible.
232  */
233  if (!async_file) {
234  char const *sep;
235 
236  sep = strrchr(file, '/');
237  if (!sep) {
238  sep = file;
239  } else {
240  sep++;
241  }
242  if (strcmp(sep, "async_posix.c") == 0) {
243  async_file = file;
244  alloc_stack:
245  len *= 4;
246  }
247  } else if (file == async_file) goto alloc_stack;
248 
249  chunk = talloc_array(ssl_talloc_ctx, uint8_t, len);
250 #ifndef NDEBUG
251  talloc_set_name(chunk, "%s:%u", file, line);
252 #endif
253  return chunk;
254 }
255 
256 /** Reallocate memory for OpenSSL in the NULL context
257  *
258  * @param old memory to realloc.
259  * @param len to extend to.
260  * @return realloced memory.
261  */
262 static void *fr_openssl_talloc_realloc(void *old, size_t len, NDEBUG_UNUSED char const *file, NDEBUG_UNUSED int line)
263 {
264  void *chunk;
265 
266  chunk = talloc_realloc_size(ssl_talloc_ctx, old, len);
267 #ifndef NDEBUG
268  talloc_set_name(chunk, "%s:%u", file, line);
269 #endif
270  return chunk;
271 }
272 
273 /** Free memory allocated by OpenSSL
274  *
275  * @param to_free memory to free.
276  */
277 #ifdef NDEBUG
278 /*
279  * If we're not debugging, use only the filename. Otherwise the
280  * cost of snprintf() is too large.
281  */
282 static void fr_openssl_talloc_free(void *to_free, char const *file, UNUSED int line)
283 {
284  (void)_talloc_free(to_free, file);
285 }
286 #else
287 static void fr_openssl_talloc_free(void *to_free, char const *file, int line)
288 {
289  char buffer[256];
290 
291  snprintf(buffer, sizeof(buffer), "%s:%i", file, line);
292  (void)_talloc_free(to_free, buffer);
293 }
294 #endif
295 
296 /** Cleanup async pools if the thread exits
297  *
298  */
299 static int _openssl_thread_free(void *init)
300 {
301  ASYNC_cleanup_thread();
302  return talloc_free(init);
303 }
304 
305 /** Perform thread-specific initialisation for OpenSSL
306  *
307  * Async contexts are what OpenSSL uses to track
308  *
309  * @param[in] async_pool_size_init The initial number of async contexts
310  * we keep in the pool.
311  * @param[in] async_pool_size_max The maximum number of async contexts
312  * we keep in the thread-local pool.
313  * @return
314  * - 0 on success.
315  * - -1 on failure.
316  */
317 int fr_openssl_thread_init(size_t async_pool_size_init, size_t async_pool_size_max)
318 {
319  /*
320  * Hack to use thread local destructor code
321  */
322  if (!async_pool_init) {
323  bool *init = talloc_zero(NULL, bool);
324 
325  if (ASYNC_init_thread(async_pool_size_max, async_pool_size_init) != 1) {
326  fr_tls_log(NULL, "Failed initialising OpenSSL async context pool");
327  return -1;
328  }
329 
330  fr_atexit_thread_local(async_pool_init, _openssl_thread_free, init);
331  }
332 
333  return 0;
334 }
335 
336 /** Free any memory alloced by libssl
337  *
338  * OpenSSL >= 1.1.0 uses an atexit handler to automatically free
339  * memory. However, we need to call OPENSSL_cleanup manually because
340  * some of the SSL ctx is parented to the main config which will get
341  * freed before the atexit handler, causing a segfault on exit.
342  */
343 void fr_openssl_free(void)
344 {
345  if (--openssl_instance_count > 0) return;
346 
347  fr_tls_log_free();
348 
349  fr_tls_bio_free();
350 }
351 
352 #if OPENSSL_VERSION_NUMBER >= 0x30000000L
353 static void _openssl_provider_free(void)
354 {
355  if (openssl_default_provider && !OSSL_PROVIDER_unload(openssl_default_provider)) {
356  fr_tls_log(NULL, "Failed unloading default provider");
357  }
358  openssl_default_provider = NULL;
359 
360  if (openssl_legacy_provider && !OSSL_PROVIDER_unload(openssl_legacy_provider)) {
361  fr_tls_log(NULL, "Failed unloading legacy provider");
362  }
363  openssl_legacy_provider = NULL;
364 }
365 #endif
366 
367 #if OPENSSL_VERSION_NUMBER < 0x30000000L
368 static void _openssl_engine_free(void)
369 {
370  fr_tls_engine_free_all();
371 }
372 #endif
373 
374 static int fr_openssl_cleanup(UNUSED void *uctx)
375 {
376  OPENSSL_cleanup();
377  return 0;
378 }
379 
380 /** Add all the default ciphers and message digests to our context.
381  *
382  * This should be called exactly once from main, before reading the main config
383  * or initialising any modules.
384  */
385 int fr_openssl_init(void)
386 {
387  if (openssl_instance_count > 0) {
388  openssl_instance_count++;
389  return 0;
390  }
391 
392  /*
393  * This will only fail if memory has already been allocated
394  * by OpenSSL.
395  */
396  if (CRYPTO_set_mem_functions(fr_openssl_talloc, fr_openssl_talloc_realloc, fr_openssl_talloc_free) != 1) {
397  fr_tls_log(NULL, "Failed to set OpenSSL memory allocation functions. fr_openssl_init() called too late");
398  return -1;
399  }
400 
401  /*
402  * NO_ATEXIT has no effect if init is done after
403  * loading providers, and we need to control the
404  * exit handler as it needs to be executed last
405  * after all the EVP_MD ctx have been called, as
406  * they may unload elements of providers once all
407  * the contexts have been cleaned up.
408  */
409  if (OPENSSL_init_ssl(OPENSSL_INIT_NO_ATEXIT | OPENSSL_INIT_LOAD_CONFIG, NULL) != 1) {
410  fr_tls_log(NULL, "Failed calling OPENSSL_init_crypto()");
411  return -1;
412  }
413 
414 #if OPENSSL_VERSION_NUMBER >= 0x30000000L
415  /*
416  * Load the default provider for most algorithms
417  */
418  openssl_default_provider = OSSL_PROVIDER_load(NULL, "default");
419  if (!openssl_default_provider) {
420  fr_tls_log(NULL, "Failed loading default provider");
421  return -1;
422  }
423 
424  /*
425  * Needed for MD4
426  *
427  * https://www.openssl.org/docs/man3.0/man7/migration_guide.html#Legacy-Algorithms
428  */
429  openssl_legacy_provider = OSSL_PROVIDER_load(NULL, "legacy");
430  if (!openssl_legacy_provider) {
431  fr_tls_log(NULL, "Failed loading legacy provider");
432  return -1;
433  }
434 #endif
435 
436  /*
437  * It's best to use OpenSSL's cleanup stack
438  * as then everything is cleaned up relative
439  * to the OPENSSL_cleanup() call.
440  */
441 #if OPENSSL_VERSION_NUMBER >= 0x30000000L
442  OPENSSL_atexit(_openssl_provider_free);
443 #endif
444 
445 #if OPENSSL_VERSION_NUMBER < 0x30000000L
446  OPENSSL_atexit(_openssl_engine_free);
447 #endif
448 
449  /*
450  * SHA256 is in all versions of OpenSSL, but isn't
451  * initialized by default. It's needed for WiMAX
452  * certificates.
453  */
454  EVP_add_digest(EVP_sha256());
455 
456  /*
457  * FIXME - This should be done _after_
458  * running any engine controls.
459  */
460 #if OPENSSL_VERSION_NUMBER < 0x30000000L
461  fr_tls_engine_load_builtin();
462 #endif
463 
464  fr_tls_log_init();
465 
466  fr_tls_bio_init();
467 
468  /*
469  * Use an atexit handler to try and ensure
470  * that OpenSSL gets freed last.
471  *
472  * All EVP_*ctxs need to be freed before we
473  * de-initialise the libraries else we get
474  * crashes (at least with OpenSSL 3.0.1).
475  */
476  fr_atexit_global(fr_openssl_cleanup, NULL);
477 
478  openssl_instance_count++;
479 
480  return 0;
481 }
482 
483 /** Enable or disable fips mode
484  *
485  * @param[in] enabled If true enable fips mode if false disable fips mode.
486  * @return
487  * - 0 on success.
488  * - -1 on failure
489  */
490 int fr_openssl_fips_mode(bool enabled)
491 {
492 #if OPENSSL_VERSION_NUMBER >= 0x30000000L
493  if (!EVP_set_default_properties(NULL, enabled ? "fips=yes" : "fips=no")) {
494  fr_tls_log(NULL, "Failed %s OpenSSL FIPS mode", enabled ? "enabling" : "disabling");
495  return -1;
496  }
497 #else
498  if (!FIPS_mode_set(enabled ? 1 : 0)) {
499  fr_tls_log(NULL, "Failed %s OpenSSL FIPS mode", enabled ? "enabling" : "disabling");
500  return -1;
501  }
502 #endif
503 
504  return 0;
505 }
506 
507 /** Load dictionary attributes
508  *
509  * This is a separate function because of ordering issues.
510  * OpenSSL may need to be initialised before anything else
511  * including the dictionary loader.
512  *
513  * fr_openssl_free will unload both the dictionary and the
514  * OpenSSL library.
515  */
516 int fr_tls_dict_init(void)
517 {
518  if (tls_instance_count > 0) {
519  tls_instance_count++;
520  return 0;
521  }
522 
523  tls_instance_count++;
524 
525  if (fr_dict_autoload(tls_dict) < 0) {
526  PERROR("Failed initialising protocol library");
527  fail:
528  tls_instance_count--;
529  fr_openssl_free();
530  return -1;
531  }
532 
533  if (fr_dict_attr_autoload(tls_dict_attr) < 0) {
534  PERROR("Failed resolving attributes");
535  goto fail;
536  }
537 
538  if (fr_dict_enum_autoload(tls_dict_enum) < 0) {
539  PERROR("Failed resolving enums");
540  goto fail;
541  }
542 
543  return 0;
544 }
545 
546 void fr_tls_dict_free(void)
547 {
548  if (--tls_instance_count > 0) return;
549 
550  fr_dict_autofree(tls_dict);
551 }
552 #endif /* WITH_TLS */
static int const char char buffer[256]
Definition: acutest.h:574
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
#define USES_APPLE_DEPRECATED_API
Definition: build.h:431
#define RCSID(id)
Definition: build.h:444
#define NDEBUG_UNUSED
Definition: build.h:324
#define UNUSED
Definition: build.h:313
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:3608
#define fr_dict_autofree(_to_free)
Definition: dict.h:674
fr_value_box_t const ** out
Enumeration value.
Definition: dict.h:239
fr_dict_attr_t const ** out
Where to write a pointer to the resolved fr_dict_attr_t.
Definition: dict.h:250
fr_dict_t const ** out
Where to write a pointer to the loaded/resolved fr_dict_t.
Definition: dict.h:263
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:3647
#define fr_dict_autoload(_to_load)
Definition: dict.h:671
Specifies an attribute which must be present for the module to function.
Definition: dict.h:249
Specifies a dictionary which must be loaded/loadable for the module to function.
Definition: dict.h:262
Specifies a value which must be present for the module to function.
Definition: dict.h:238
fr_dict_attr_t const * attr_tls_certificate
Attribute definitions for lib curl.
Definition: base.c:35
fr_dict_t const * dict_freeradius
Definition: base.c:73
fr_dict_t const * dict_radius
Definition: base.c:74
#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_t const * dict_tls
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_attr_t const * attr_tls_certificate_subject_alt_name_dns
HIDDEN fr_dict_attr_t const * attr_tls_session_ttl
HIDDEN fr_dict_attr_t const * attr_framed_mtu
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
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
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_packet_type_notfound
HIDDEN fr_dict_attr_t const * attr_tls_certificate_signature
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_subject_alt_name_email
HIDDEN fr_dict_attr_t const * attr_allow_session_resumption
talloc_free(reap)
@ FR_TYPE_TIME_DELTA
A period of time measured in nanoseconds.
Definition: merged_model.c:113
@ FR_TYPE_TLV
Contains nested attributes.
Definition: merged_model.c:118
@ FR_TYPE_STRING
String of printable characters.
Definition: merged_model.c:83
@ FR_TYPE_DATE
Unix time stamp, always has value >2^31.
Definition: merged_model.c:111
@ FR_TYPE_UINT8
8 Bit unsigned integer.
Definition: merged_model.c:97
@ FR_TYPE_UINT32
32 Bit unsigned integer.
Definition: merged_model.c:99
@ FR_TYPE_BOOL
A truth value.
Definition: merged_model.c:95
@ FR_TYPE_OCTETS
Raw octets.
Definition: merged_model.c:84
unsigned int uint32_t
Definition: merged_model.c:33
unsigned char uint8_t
Definition: merged_model.c:30
PUBLIC int snprintf(char *string, size_t length, char *format, va_alist)
Definition: snprintf.c:689
init
Enter the EAP-IDENTITY state.
Definition: state_machine.c:90