The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
rlm_eap_peap.c
Go to the documentation of this file.
1 /*
2  * rlm_eap_peap.c contains the interfaces that are called from eap
3  *
4  * Version: $Id: d982f07c1c806e71157d8cfd48d54d8b316fbd93 $
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  *
20  * @copyright 2003 Alan DeKok (aland@freeradius.org)
21  * @copyright 2006 The FreeRADIUS server project
22  */
23 RCSID("$Id: d982f07c1c806e71157d8cfd48d54d8b316fbd93 $")
24 
25 #include <freeradius-devel/eap/tls.h>
26 #include "eap_peap.h"
27 
28 typedef struct {
29  SSL_CTX *ssl_ctx; //!< Thread local SSL_CTX.
31 
32 typedef struct {
33  char const *tls_conf_name; //!< TLS configuration.
34  fr_tls_conf_t *tls_conf;
35 
36  bool use_tunneled_reply; //!< Use the reply attributes from the tunneled session in
37  //!< the non-tunneled reply to the client.
38 
39  bool copy_request_to_tunnel; //!< Use SOME of the request attributes from outside of the
40  //!< tunneled session in the tunneled request.
41 #ifdef WITH_PROXY
42  bool proxy_tunneled_request_as_eap; //!< Proxy tunneled session as EAP, or as de-capsulated
43  //!< protocol.
44 #endif
45  char const *virtual_server; //!< Virtual server for inner tunnel session.
46 
47  bool req_client_cert; //!< Do we do require a client cert?
49 
51  { FR_CONF_OFFSET("tls", rlm_eap_peap_t, tls_conf_name) },
52 
53  { FR_CONF_DEPRECATED("copy_request_to_tunnel", rlm_eap_peap_t, NULL), .dflt = "no" },
54 
55  { FR_CONF_DEPRECATED("use_tunneled_reply", rlm_eap_peap_t, NULL), .dflt = "no" },
56 
57 #ifdef WITH_PROXY
58  { FR_CONF_OFFSET("proxy_tunneled_request_as_eap", rlm_eap_peap_t, proxy_tunneled_request_as_eap), .dflt = "yes" },
59 #endif
60 
61  { FR_CONF_OFFSET_FLAGS("virtual_server", CONF_FLAG_REQUIRED | CONF_FLAG_NOT_EMPTY, rlm_eap_peap_t, virtual_server) },
62 
63  { FR_CONF_OFFSET("require_client_cert", rlm_eap_peap_t, req_client_cert), .dflt = "no" },
64 
66 };
67 
68 static fr_dict_t const *dict_freeradius;
69 static fr_dict_t const *dict_radius;
70 
73  { .out = &dict_freeradius, .proto = "freeradius" },
74  { .out = &dict_radius, .proto = "radius" },
75  { NULL }
76 };
77 
81 
85 
88  { .out = &attr_auth_type, .name = "Auth-Type", .type = FR_TYPE_UINT32, .dict = &dict_freeradius },
89  { .out = &attr_eap_tls_require_client_cert, .name = "EAP-TLS-Require-Client-Cert", .type = FR_TYPE_UINT32, .dict = &dict_freeradius },
90  { .out = &attr_proxy_to_realm, .name = "Proxy-To-Realm", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
91 
92  { .out = &attr_eap_message, .name = "EAP-Message", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
93  { .out = &attr_freeradius_proxied_to, .name = "Vendor-Specific.FreeRADIUS.Proxied-To", .type = FR_TYPE_IPV4_ADDR, .dict = &dict_radius },
94  { .out = &attr_user_name, .name = "User-Name", .type = FR_TYPE_STRING, .dict = &dict_radius },
95  { NULL }
96 };
97 
98 
99 /*
100  * Allocate the PEAP per-session data
101  */
102 static peap_tunnel_t *peap_alloc(TALLOC_CTX *ctx, rlm_eap_peap_t *inst)
103 {
104  peap_tunnel_t *t;
105 
106  t = talloc_zero(ctx, peap_tunnel_t);
107 
108 #ifdef WITH_PROXY
109  t->proxy_tunneled_request_as_eap = inst->proxy_tunneled_request_as_eap;
110 #endif
111  t->virtual_server = inst->virtual_server;
113 
114  return t;
115 }
116 
118 {
119  rlm_eap_peap_t *inst = talloc_get_type(mctx->inst->data, rlm_eap_peap_t);
120 
121  rlm_rcode_t rcode;
122 
123  eap_session_t *eap_session = talloc_get_type_abort(mctx->rctx, eap_session_t);
124  eap_tls_session_t *eap_tls_session = talloc_get_type_abort(eap_session->opaque, eap_tls_session_t);
125  fr_tls_session_t *tls_session = eap_tls_session->tls_session;
126  peap_tunnel_t *peap = talloc_get_type_abort(tls_session->opaque, peap_tunnel_t);
127 
128  if ((eap_tls_session->state == EAP_TLS_INVALID) || (eap_tls_session->state == EAP_TLS_FAIL)) {
129  REDEBUG("[eap-tls process] = %s", fr_table_str_by_value(eap_tls_status_table, eap_tls_session->state, "<INVALID>"));
130  } else {
131  RDEBUG2("[eap-tls process] = %s", fr_table_str_by_value(eap_tls_status_table, eap_tls_session->state, "<INVALID>"));
132  }
133 
134  switch (eap_tls_session->state) {
135  /*
136  * EAP-TLS handshake was successful, tell the
137  * client to keep talking.
138  *
139  * If this was EAP-TLS, we would just return
140  * an EAP-TLS-Success packet here.
141  */
142  case EAP_TLS_ESTABLISHED:
144  break;
145 
146  /*
147  * The TLS code is still working on the TLS
148  * exchange, and it's a valid TLS request.
149  * do nothing.
150  */
151  case EAP_TLS_HANDLED:
152  /*
153  * FIXME: If the SSL session is established, grab the state
154  * and EAP id from the inner tunnel, and update it with
155  * the expected EAP id!
156  */
158 
159  /*
160  * Handshake is done, proceed with decoding tunneled
161  * data.
162  */
164  /*
165  * TLSv1.3 makes application data immediately
166  * available when the handshake is finished.
167  */
168  if (SSL_is_init_finished(tls_session->ssl) && (peap->status == PEAP_STATUS_INVALID)) {
170  }
171  break;
172 
173  /*
174  * Anything else: fail.
175  */
176  default:
178  }
179 
180  /*
181  * Session is established, proceed with decoding
182  * tunneled data.
183  */
184  RDEBUG2("Session established. Decoding tunneled data");
185 
186  /*
187  * We may need PEAP data associated with the session, so
188  * allocate it here, if it wasn't already alloacted.
189  */
190  if (!tls_session->opaque) tls_session->opaque = peap_alloc(tls_session, inst);
191 
192  /*
193  * Process the PEAP portion of the request.
194  */
195  eap_peap_process(&rcode, request, eap_session, tls_session);
196  switch (rcode) {
197  case RLM_MODULE_REJECT:
198  eap_tls_fail(request, eap_session);
199  break;
200 
201  case RLM_MODULE_HANDLED:
202  eap_tls_request(request, eap_session);
203  break;
204 
205  case RLM_MODULE_OK:
206  {
207  eap_tls_prf_label_t prf_label;
208 
209  eap_crypto_prf_label_init(&prf_label, eap_session,
210  "client EAP encryption",
211  sizeof("client EAP encryption") - 1);
212 
213  /*
214  * Success: Automatically return MPPE keys.
215  */
216  if (eap_tls_success(request, eap_session, &prf_label) > 0) RETURN_MODULE_FAIL;
217  *p_result = rcode;
218 
219  /*
220  * Write the session to the session cache
221  *
222  * We do this here (instead of relying on OpenSSL to call the
223  * session caching callback), because we only want to write
224  * session data to the cache if all phases were successful.
225  *
226  * If we wrote out the cache data earlier, and the server
227  * exited whilst the session was in progress, the supplicant
228  * could resume the session (and get access) even if phase2
229  * never completed.
230  */
231  return fr_tls_cache_pending_push(request, tls_session);
232  }
233 
234  /*
235  * No response packet, MUST be proxying it.
236  * The main EAP module will take care of discovering
237  * that the request now has a "proxy" packet, and
238  * will proxy it, rather than returning an EAP packet.
239  */
240  case RLM_MODULE_UPDATED:
241  break;
242 
243  default:
244  eap_tls_fail(request, eap_session);
245  break;
246  }
247 
248  RETURN_MODULE_RCODE(rcode);
249 }
250 
251 /*
252  * Do authentication, by letting EAP-TLS do most of the work.
253  */
255  request_t *request)
256 {
257  eap_session_t *eap_session = eap_session_get(request->parent);
258 
259  /*
260  * Setup the resumption frame to process the result
261  */
262  (void)unlang_module_yield(request, mod_handshake_resume, NULL, 0, eap_session);
263 
264  /*
265  * Process TLS layer until done.
266  */
267  return eap_tls_process(request, eap_session);
268 }
269 
270 /*
271  * Send an initial eap-tls request to the peer, using the libeap functions.
272  */
273 static unlang_action_t mod_session_init(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
274 {
275  rlm_eap_peap_t *inst = talloc_get_type_abort(mctx->inst->data, rlm_eap_peap_t);
276  rlm_eap_peap_thread_t *t = talloc_get_type_abort(mctx->thread, rlm_eap_peap_thread_t);
277  eap_session_t *eap_session = eap_session_get(request->parent);
278  eap_tls_session_t *eap_tls_session;
279  fr_tls_session_t *tls_session;
280 
281  fr_pair_t *vp;
282  bool client_cert;
283 
284  eap_session->tls = true;
285 
286  /*
287  * EAP-TLS-Require-Client-Cert attribute will override
288  * the require_client_cert configuration option.
289  */
290  vp = fr_pair_find_by_da(&request->control_pairs, NULL, attr_eap_tls_require_client_cert);
291  if (vp) {
292  client_cert = vp->vp_uint32 ? true : false;
293  } else {
294  client_cert = inst->req_client_cert;
295  }
296 
297  eap_session->opaque = eap_tls_session = eap_tls_session_init(request, eap_session, t->ssl_ctx, client_cert);
298  if (!eap_tls_session) RETURN_MODULE_FAIL;
299 
300  tls_session = eap_tls_session->tls_session;
301 
302  /*
303  * As it is a poorly designed protocol, PEAP uses
304  * bits in the TLS header to indicate PEAP
305  * version numbers. For now, we only support
306  * PEAP version 0, so it doesn't matter too much.
307  * However, if we support later versions of PEAP,
308  * we will need this flag to indicate which
309  * version we're currently dealing with.
310  */
311  eap_tls_session->base_flags = 0x00;
312 
313  /*
314  * PEAP version 0 requires 'include_length = no',
315  * so rather than hoping the user figures it out,
316  * we force it here.
317  */
318  eap_tls_session->include_length = false;
319 
320  /*
321  * TLS session initialization is over. Now handle TLS
322  * related handshaking or application data.
323  */
324  if (eap_tls_start(request, eap_session) < 0) {
325  talloc_free(eap_tls_session);
327  }
328 
329  /*
330  * Session resumption requires the storage of data, so
331  * allocate it if it doesn't already exist.
332  */
333  tls_session->opaque = peap_alloc(tls_session, inst);
334 
335  eap_session->process = mod_handshake_process;
336 
338 }
339 
341 {
342  rlm_eap_peap_t *inst = talloc_get_type_abort(mctx->inst->data, rlm_eap_peap_t);
343  rlm_eap_peap_thread_t *t = talloc_get_type_abort(mctx->thread, rlm_eap_peap_thread_t);
344 
345  t->ssl_ctx = fr_tls_ctx_alloc(inst->tls_conf, false);
346  if (!t->ssl_ctx) return -1;
347 
348  return 0;
349 }
350 
352 {
353  rlm_eap_peap_thread_t *t = talloc_get_type_abort(mctx->thread, rlm_eap_peap_thread_t);
354 
355  if (likely(t->ssl_ctx != NULL)) SSL_CTX_free(t->ssl_ctx);
356  t->ssl_ctx = NULL;
357 
358  return 0;
359 }
360 
361 /*
362  * Attach the module.
363  */
364 static int mod_instantiate(module_inst_ctx_t const *mctx)
365 {
366  rlm_eap_peap_t *inst = talloc_get_type_abort(mctx->inst->data, rlm_eap_peap_t);
367  CONF_SECTION *conf = mctx->inst->conf;
368 
369  if (!virtual_server_find(inst->virtual_server)) {
370  cf_log_err_by_child(conf, "virtual_server", "Unknown virtual server '%s'", inst->virtual_server);
371  return -1;
372  }
373 
374  /*
375  * Read tls configuration, either from group given by 'tls'
376  * option, or from the eap-tls configuration.
377  */
378  inst->tls_conf = eap_tls_conf_parse(conf, "tls");
379  if (!inst->tls_conf) {
380  cf_log_err(conf, "Failed initializing SSL context");
381  return -1;
382  }
383 
384  return 0;
385 }
386 
387 /*
388  * The module name should be the only globally exported symbol.
389  * That is, everything else should be 'static'.
390  */
393  .common = {
394  .magic = MODULE_MAGIC_INIT,
395  .name = "eap_peap",
396  .inst_size = sizeof(rlm_eap_peap_t),
399 
400  .thread_inst_size = sizeof(rlm_eap_peap_thread_t),
401  .thread_instantiate = mod_thread_instantiate,
402  .thread_detach = mod_thread_detach,
403  },
404  .provides = { FR_EAP_METHOD_PEAP },
405  .session_init = mod_session_init, /* Initialise a new EAP session */
406 };
#define true
Definition: abinary.c:57
unlang_action_t
Returned by unlang_op_t calls, determine the next action of the interpreter.
Definition: action.h:35
#define RCSID(id)
Definition: build.h:444
#define UNUSED
Definition: build.h:313
#define CONF_PARSER_TERMINATOR
Definition: cf_parse.h:626
#define FR_CONF_DEPRECATED(_name, _struct, _field)
conf_parser_t entry which raises an error if a matching CONF_PAIR is found
Definition: cf_parse.h:385
#define FR_CONF_OFFSET(_name, _struct, _field)
conf_parser_t which parses a single CONF_PAIR, writing the result to a field in a struct
Definition: cf_parse.h:268
#define FR_CONF_OFFSET_FLAGS(_name, _flags, _struct, _field)
conf_parser_t which parses a single CONF_PAIR, writing the result to a field in a struct
Definition: cf_parse.h:256
@ CONF_FLAG_REQUIRED
Error out if no matching CONF_PAIR is found, and no dflt value is set.
Definition: cf_parse.h:406
@ CONF_FLAG_NOT_EMPTY
CONF_PAIR is required to have a non zero length value.
Definition: cf_parse.h:421
Defines a CONF_PAIR to C data type mapping.
Definition: cf_parse.h:563
A section grouping multiple CONF_PAIR.
Definition: cf_priv.h:89
#define cf_log_err(_cf, _fmt,...)
Definition: cf_util.h:265
#define cf_log_err_by_child(_parent, _child, _fmt,...)
Log an error message against a specified child.
Definition: cf_util.h:292
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
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
void *_CONST data
Module instance's parsed configuration.
Definition: dl_module.h:165
#define MODULE_MAGIC_INIT
Stop people using different module/library/server versions together.
Definition: dl_module.h:65
CONF_SECTION *_CONST conf
Module's instance configuration.
Definition: dl_module.h:166
void eap_crypto_prf_label_init(eap_tls_prf_label_t *prf_label, eap_session_t *eap_session, char const *keying_prf_label, size_t keying_prf_label_len)
Initialize the PRF label fields.
Definition: crypto.c:48
@ FR_EAP_METHOD_PEAP
Definition: types.h:70
@ PEAP_STATUS_TUNNEL_ESTABLISHED
Definition: eap_peap.h:32
@ PEAP_STATUS_INVALID
Definition: eap_peap.h:29
bool proxy_tunneled_request_as_eap
Definition: eap_peap.h:49
@ PEAP_RESUMPTION_MAYBE
Definition: eap_peap.h:41
char const * virtual_server
Definition: eap_peap.h:50
peap_status status
Definition: eap_peap.h:46
peap_resumption session_resumption_state
Definition: eap_peap.h:51
unlang_action_t eap_peap_process(rlm_rcode_t *p_result, request_t *request, eap_session_t *eap_session, fr_tls_session_t *tls_session)
Definition: peap.c:378
void * opaque
Opaque data used by EAP methods.
Definition: session.h:62
bool tls
Whether EAP method uses TLS.
Definition: session.h:70
module_method_t process
Callback that should be used to process the next round.
Definition: session.h:64
static eap_session_t * eap_session_get(request_t *request)
Definition: session.h:82
Tracks the progress of a single session of any EAP method.
Definition: session.h:40
talloc_free(reap)
@ FR_TYPE_IPV4_ADDR
32 Bit IPv4 Address.
Definition: merged_model.c:86
@ FR_TYPE_STRING
String of printable characters.
Definition: merged_model.c:83
@ FR_TYPE_UINT32
32 Bit unsigned integer.
Definition: merged_model.c:99
@ FR_TYPE_OCTETS
Raw octets.
Definition: merged_model.c:84
void * thread
Thread specific instance data.
Definition: module_ctx.h:43
void * rctx
Resume ctx that a module previously set.
Definition: module_ctx.h:45
dl_module_inst_t const * inst
Dynamic loader API handle for the module.
Definition: module_ctx.h:52
void * thread
Thread instance data.
Definition: module_ctx.h:62
dl_module_inst_t const * inst
Dynamic loader API handle for the module.
Definition: module_ctx.h:42
dl_module_inst_t const * inst
Dynamic loader API handle for the module.
Definition: module_ctx.h:59
Temporary structure to hold arguments for module calls.
Definition: module_ctx.h:41
Temporary structure to hold arguments for instantiation calls.
Definition: module_ctx.h:51
Temporary structure to hold arguments for thread_instantiation calls.
Definition: module_ctx.h:58
fr_pair_t * fr_pair_find_by_da(fr_pair_list_t const *list, fr_pair_t const *prev, fr_dict_attr_t const *da)
Find the first pair with a matching da.
Definition: pair.c:688
static const conf_parser_t config[]
Definition: base.c:188
#define REDEBUG(fmt,...)
Definition: radclient.h:52
#define RDEBUG2(fmt,...)
Definition: radclient.h:54
static rs_t * conf
Definition: radsniff.c:53
#define RETURN_MODULE_RCODE(_rcode)
Definition: rcode.h:64
#define RETURN_MODULE_HANDLED
Definition: rcode.h:58
rlm_rcode_t
Return codes indicating the result of the module call.
Definition: rcode.h:40
@ RLM_MODULE_OK
The module is OK, continue.
Definition: rcode.h:43
@ RLM_MODULE_REJECT
Immediately reject the request.
Definition: rcode.h:41
@ RLM_MODULE_UPDATED
OK (pairs modified).
Definition: rcode.h:49
@ RLM_MODULE_HANDLED
The module handled the request, so stop.
Definition: rcode.h:44
bool copy_request_to_tunnel
Use SOME of the request attributes from outside of the tunneled session in the tunneled request.
Definition: rlm_eap_peap.c:39
static unlang_action_t mod_handshake_resume(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
Definition: rlm_eap_peap.c:117
fr_dict_attr_t const * attr_freeradius_proxied_to
Definition: rlm_eap_peap.c:83
fr_dict_attr_t const * attr_eap_message
Definition: rlm_eap_peap.c:82
static unlang_action_t mod_handshake_process(UNUSED rlm_rcode_t *p_result, UNUSED module_ctx_t const *mctx, request_t *request)
Definition: rlm_eap_peap.c:254
static peap_tunnel_t * peap_alloc(TALLOC_CTX *ctx, rlm_eap_peap_t *inst)
Definition: rlm_eap_peap.c:102
static fr_dict_t const * dict_freeradius
Definition: rlm_eap_peap.c:68
fr_dict_attr_t const * attr_eap_tls_require_client_cert
Definition: rlm_eap_peap.c:79
char const * virtual_server
Virtual server for inner tunnel session.
Definition: rlm_eap_peap.c:45
SSL_CTX * ssl_ctx
Thread local SSL_CTX.
Definition: rlm_eap_peap.c:29
fr_dict_attr_autoload_t rlm_eap_peap_dict_attr[]
Definition: rlm_eap_peap.c:87
fr_dict_autoload_t rlm_eap_peap_dict[]
Definition: rlm_eap_peap.c:72
static fr_dict_t const * dict_radius
Definition: rlm_eap_peap.c:69
fr_dict_attr_t const * attr_auth_type
Definition: rlm_eap_peap.c:78
char const * tls_conf_name
TLS configuration.
Definition: rlm_eap_peap.c:33
fr_tls_conf_t * tls_conf
Definition: rlm_eap_peap.c:34
bool req_client_cert
Do we do require a client cert?
Definition: rlm_eap_peap.c:47
rlm_eap_submodule_t rlm_eap_peap
Definition: rlm_eap_peap.c:392
bool use_tunneled_reply
Use the reply attributes from the tunneled session in the non-tunneled reply to the client.
Definition: rlm_eap_peap.c:36
static int mod_thread_instantiate(module_thread_inst_ctx_t const *mctx)
Definition: rlm_eap_peap.c:340
fr_dict_attr_t const * attr_user_name
Definition: rlm_eap_peap.c:84
fr_dict_attr_t const * attr_proxy_to_realm
Definition: rlm_eap_peap.c:80
static conf_parser_t submodule_config[]
Definition: rlm_eap_peap.c:50
static int mod_thread_detach(module_thread_inst_ctx_t const *mctx)
Definition: rlm_eap_peap.c:351
static int mod_instantiate(module_inst_ctx_t const *mctx)
Definition: rlm_eap_peap.c:364
static unlang_action_t mod_session_init(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
Definition: rlm_eap_peap.c:273
static int instantiate(module_inst_ctx_t const *mctx)
Definition: rlm_rest.c:1312
unlang_action_t unlang_module_yield(request_t *request, module_method_t resume, unlang_module_signal_t signal, fr_signal_t sigmask, void *rctx)
Yield a request back to the interpreter from within a module.
Definition: module.c:575
RETURN_MODULE_FAIL
eap_aka_sim_process_conf_t * inst
fr_pair_t * vp
Stores an attribute, a value and various bits of other data.
Definition: pair.h:68
module_t common
Common fields provided by all modules.
Definition: submodule.h:50
Interface exported by EAP submodules.
Definition: submodule.h:49
#define fr_table_str_by_value(_table, _number, _def)
Convert an integer to a string.
Definition: table.h:253
int eap_tls_success(request_t *request, eap_session_t *eap_session, eap_tls_prf_label_t *prf_label)
Send an EAP-TLS success.
Definition: tls.c:262
eap_tls_session_t * eap_tls_session_init(request_t *request, eap_session_t *eap_session, SSL_CTX *ssl_ctx, bool client_cert)
Create a new fr_tls_session_t associated with an eap_session_t.
Definition: tls.c:1125
int eap_tls_start(request_t *request, eap_session_t *eap_session)
Send an initial EAP-TLS request to the peer.
Definition: tls.c:237
int eap_tls_request(request_t *request, eap_session_t *eap_session)
Frames the OpenSSL data that needs to be sent to the client in an EAP-Request.
Definition: tls.c:370
int eap_tls_fail(request_t *request, eap_session_t *eap_session)
Send an EAP-TLS failure.
Definition: tls.c:320
USES_APPLE_DEPRECATED_API fr_table_num_ordered_t const eap_tls_status_table[]
Definition: tls.c:78
fr_tls_conf_t * eap_tls_conf_parse(CONF_SECTION *cs, char const *attr)
Parse TLS configuration.
Definition: tls.c:1210
unlang_action_t eap_tls_process(request_t *request, eap_session_t *eap_session)
Process an EAP TLS request.
Definition: tls.c:957
int base_flags
Some protocols use the reserved bits of the EAP-TLS flags (such as PEAP).
Definition: tls.h:132
eap_tls_status_t state
The state of the EAP-TLS session.
Definition: tls.h:127
@ EAP_TLS_INVALID
Invalid, don't reply.
Definition: tls.h:91
@ EAP_TLS_HANDLED
TLS code has handled it.
Definition: tls.h:94
@ EAP_TLS_RECORD_RECV_COMPLETE
Received final fragment of a record.
Definition: tls.h:111
@ EAP_TLS_FAIL
Fail, send fail.
Definition: tls.h:93
@ EAP_TLS_ESTABLISHED
Session established, send success (or start phase2).
Definition: tls.h:92
fr_tls_session_t * tls_session
TLS session used to authenticate peer or tunnel sensitive data.
Definition: tls.h:129
bool include_length
A flag to include length in every TLS Data/Alert packet.
Definition: tls.h:138
Tracks the state of an EAP-TLS session.
Definition: tls.h:126
CONF_SECTION * virtual_server_find(char const *name)
Return virtual server matching the specified name.