The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Data Structures | Functions | Variables
rlm_eap_ttls.c File Reference

EAP-TTLS as defined by RFC 5281. More...

#include <freeradius-devel/eap/tls.h>
#include "eap_ttls.h"
+ Include dependency graph for rlm_eap_ttls.c:

Go to the source code of this file.

Data Structures

struct  rlm_eap_ttls_t
 
struct  rlm_eap_ttls_thread_t
 

Functions

static unlang_action_t mod_handshake_process (UNUSED rlm_rcode_t *p_result, UNUSED module_ctx_t const *mctx, request_t *request)
 
static unlang_action_t mod_handshake_resume (rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
 
static int mod_instantiate (module_inst_ctx_t const *mctx)
 
static unlang_action_t mod_session_init (rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
 
static int mod_thread_detach (module_thread_inst_ctx_t const *mctx)
 
static int mod_thread_instantiate (module_thread_inst_ctx_t const *mctx)
 
static ttls_tunnel_tttls_alloc (TALLOC_CTX *ctx, rlm_eap_ttls_t *inst)
 

Variables

fr_dict_attr_t const * attr_chap_challenge
 
fr_dict_attr_t const * attr_eap_channel_binding_message
 
fr_dict_attr_t const * attr_eap_message
 
fr_dict_attr_t const * attr_eap_tls_require_client_cert
 
fr_dict_attr_t const * attr_freeradius_proxied_to
 
fr_dict_attr_t const * attr_ms_chap2_success
 
fr_dict_attr_t const * attr_ms_chap_challenge
 
fr_dict_attr_t const * attr_proxy_to_realm
 
fr_dict_attr_t const * attr_reply_message
 
fr_dict_attr_t const * attr_user_name
 
fr_dict_attr_t const * attr_user_password
 
fr_dict_attr_t const * attr_vendor_specific
 
static fr_dict_t const * dict_freeradius
 
static fr_dict_t const * dict_radius
 
rlm_eap_submodule_t rlm_eap_ttls
 
fr_dict_autoload_t rlm_eap_ttls_dict []
 
fr_dict_attr_autoload_t rlm_eap_ttls_dict_attr []
 
static conf_parser_t submodule_config []
 

Detailed Description

EAP-TTLS as defined by RFC 5281.

Id
1bd95d5a2af0feb68ef92609078a82b778b620f6

Definition in file rlm_eap_ttls.c.


Data Structure Documentation

◆ rlm_eap_ttls_t

struct rlm_eap_ttls_t

Definition at line 36 of file rlm_eap_ttls.c.

Data Fields
bool include_length
bool req_client_cert
fr_tls_conf_t * tls_conf
char const * tls_conf_name
char const * virtual_server

◆ rlm_eap_ttls_thread_t

struct rlm_eap_ttls_thread_t

Definition at line 32 of file rlm_eap_ttls.c.

Data Fields
SSL_CTX * ssl_ctx Thread local SSL_CTX.

Function Documentation

◆ mod_handshake_process()

static unlang_action_t mod_handshake_process ( UNUSED rlm_rcode_t p_result,
UNUSED module_ctx_t const *  mctx,
request_t request 
)
static

Definition at line 267 of file rlm_eap_ttls.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mod_handshake_resume()

static unlang_action_t mod_handshake_resume ( rlm_rcode_t p_result,
module_ctx_t const *  mctx,
request_t request 
)
static

Definition at line 131 of file rlm_eap_ttls.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mod_instantiate()

static int mod_instantiate ( module_inst_ctx_t const *  mctx)
static

Definition at line 356 of file rlm_eap_ttls.c.

+ Here is the call graph for this function:

◆ mod_session_init()

static unlang_action_t mod_session_init ( rlm_rcode_t p_result,
module_ctx_t const *  mctx,
request_t request 
)
static

Definition at line 286 of file rlm_eap_ttls.c.

+ Here is the call graph for this function:

◆ mod_thread_detach()

static int mod_thread_detach ( module_thread_inst_ctx_t const *  mctx)
static

Definition at line 343 of file rlm_eap_ttls.c.

◆ mod_thread_instantiate()

static int mod_thread_instantiate ( module_thread_inst_ctx_t const *  mctx)
static

Definition at line 332 of file rlm_eap_ttls.c.

◆ ttls_alloc()

static ttls_tunnel_t* ttls_alloc ( TALLOC_CTX *  ctx,
rlm_eap_ttls_t inst 
)
static

Definition at line 121 of file rlm_eap_ttls.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ attr_chap_challenge

fr_dict_attr_t const* attr_chap_challenge

Definition at line 89 of file rlm_eap_ttls.c.

◆ attr_eap_channel_binding_message

fr_dict_attr_t const* attr_eap_channel_binding_message

Definition at line 95 of file rlm_eap_ttls.c.

◆ attr_eap_message

fr_dict_attr_t const* attr_eap_message

Definition at line 91 of file rlm_eap_ttls.c.

◆ attr_eap_tls_require_client_cert

fr_dict_attr_t const* attr_eap_tls_require_client_cert

Definition at line 86 of file rlm_eap_ttls.c.

◆ attr_freeradius_proxied_to

fr_dict_attr_t const* attr_freeradius_proxied_to

Definition at line 92 of file rlm_eap_ttls.c.

◆ attr_ms_chap2_success

fr_dict_attr_t const* attr_ms_chap2_success

Definition at line 90 of file rlm_eap_ttls.c.

◆ attr_ms_chap_challenge

fr_dict_attr_t const* attr_ms_chap_challenge

Definition at line 93 of file rlm_eap_ttls.c.

◆ attr_proxy_to_realm

fr_dict_attr_t const* attr_proxy_to_realm

Definition at line 87 of file rlm_eap_ttls.c.

◆ attr_reply_message

fr_dict_attr_t const* attr_reply_message

Definition at line 94 of file rlm_eap_ttls.c.

◆ attr_user_name

fr_dict_attr_t const* attr_user_name

Definition at line 96 of file rlm_eap_ttls.c.

◆ attr_user_password

fr_dict_attr_t const* attr_user_password

Definition at line 97 of file rlm_eap_ttls.c.

◆ attr_vendor_specific

fr_dict_attr_t const* attr_vendor_specific

Definition at line 98 of file rlm_eap_ttls.c.

◆ dict_freeradius

fr_dict_t const* dict_freeradius
static

Definition at line 76 of file rlm_eap_ttls.c.

◆ dict_radius

fr_dict_t const* dict_radius
static

Definition at line 77 of file rlm_eap_ttls.c.

◆ rlm_eap_ttls

rlm_eap_submodule_t rlm_eap_ttls
Initial value:
= {
.common = {
.name = "eap_ttls",
.inst_size = sizeof(rlm_eap_ttls_t),
.thread_inst_size = sizeof(rlm_eap_ttls_thread_t),
.thread_instantiate = mod_thread_instantiate,
.thread_detach = mod_thread_detach,
},
.provides = { FR_EAP_METHOD_TTLS },
.session_init = mod_session_init,
}
#define MODULE_MAGIC_INIT
Stop people using different module/library/server versions together.
Definition: dl_module.h:65
@ FR_EAP_METHOD_TTLS
Definition: types.h:66
static const conf_parser_t config[]
Definition: base.c:188
static int mod_thread_instantiate(module_thread_inst_ctx_t const *mctx)
Definition: rlm_eap_ttls.c:332
static conf_parser_t submodule_config[]
Definition: rlm_eap_ttls.c:66
static int mod_thread_detach(module_thread_inst_ctx_t const *mctx)
Definition: rlm_eap_ttls.c:343
static int mod_instantiate(module_inst_ctx_t const *mctx)
Definition: rlm_eap_ttls.c:356
static unlang_action_t mod_session_init(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
Definition: rlm_eap_ttls.c:286
static int instantiate(module_inst_ctx_t const *mctx)
Definition: rlm_rest.c:1312

Definition at line 384 of file rlm_eap_ttls.c.

◆ rlm_eap_ttls_dict

fr_dict_autoload_t rlm_eap_ttls_dict
Initial value:
= {
{ .out = &dict_freeradius, .proto = "freeradius" },
{ .out = &dict_radius, .proto = "radius" },
{ NULL }
}
static fr_dict_t const * dict_freeradius
Definition: rlm_eap_ttls.c:76
static fr_dict_t const * dict_radius
Definition: rlm_eap_ttls.c:77

Definition at line 80 of file rlm_eap_ttls.c.

◆ rlm_eap_ttls_dict_attr

fr_dict_attr_autoload_t rlm_eap_ttls_dict_attr
Initial value:
= {
{ .out = &attr_eap_tls_require_client_cert, .name = "EAP-TLS-Require-Client-Cert", .type = FR_TYPE_UINT32, .dict = &dict_freeradius },
{ .out = &attr_proxy_to_realm, .name = "Proxy-To-Realm", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
{ .out = &attr_chap_challenge, .name = "CHAP-Challenge", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
{ .out = &attr_eap_message, .name = "EAP-Message", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
{ .out = &attr_freeradius_proxied_to, .name = "Vendor-Specific.FreeRADIUS.Proxied-To", .type = FR_TYPE_IPV4_ADDR, .dict = &dict_radius },
{ .out = &attr_ms_chap_challenge, .name = "Vendor-Specific.Microsoft.CHAP-Challenge", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
{ .out = &attr_ms_chap2_success, .name = "Vendor-Specific.Microsoft.CHAP2-Success", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
{ .out = &attr_reply_message, .name = "Reply-Message", .type = FR_TYPE_STRING, .dict = &dict_radius },
{ .out = &attr_eap_channel_binding_message, .name = "Vendor-Specific.UKERNA.EAP-Channel-Binding-Message", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
{ .out = &attr_user_name, .name = "User-Name", .type = FR_TYPE_STRING, .dict = &dict_radius },
{ .out = &attr_user_password, .name = "User-Password", .type = FR_TYPE_STRING, .dict = &dict_radius },
{ .out = &attr_vendor_specific, .name = "Vendor-Specific", .type = FR_TYPE_VSA, .dict = &dict_radius },
{ NULL }
}
@ 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_VSA
Vendor-Specific, for RADIUS attribute 26.
Definition: merged_model.c:121
@ FR_TYPE_OCTETS
Raw octets.
Definition: merged_model.c:84
fr_dict_attr_t const * attr_user_password
Definition: rlm_eap_ttls.c:97
fr_dict_attr_t const * attr_freeradius_proxied_to
Definition: rlm_eap_ttls.c:92
fr_dict_attr_t const * attr_eap_message
Definition: rlm_eap_ttls.c:91
fr_dict_attr_t const * attr_eap_channel_binding_message
Definition: rlm_eap_ttls.c:95
fr_dict_attr_t const * attr_eap_tls_require_client_cert
Definition: rlm_eap_ttls.c:86
fr_dict_attr_t const * attr_ms_chap2_success
Definition: rlm_eap_ttls.c:90
fr_dict_attr_t const * attr_ms_chap_challenge
Definition: rlm_eap_ttls.c:93
fr_dict_attr_t const * attr_chap_challenge
Definition: rlm_eap_ttls.c:89
fr_dict_attr_t const * attr_vendor_specific
Definition: rlm_eap_ttls.c:98
fr_dict_attr_t const * attr_reply_message
Definition: rlm_eap_ttls.c:94
fr_dict_attr_t const * attr_user_name
Definition: rlm_eap_ttls.c:96
fr_dict_attr_t const * attr_proxy_to_realm
Definition: rlm_eap_ttls.c:87

Definition at line 101 of file rlm_eap_ttls.c.

◆ submodule_config

conf_parser_t submodule_config[]
static
Initial value:
= {
{ FR_CONF_OFFSET("tls", rlm_eap_ttls_t, tls_conf_name) },
{ FR_CONF_DEPRECATED("copy_request_to_tunnel", rlm_eap_ttls_t, NULL), .dflt = "no" },
{ FR_CONF_DEPRECATED("use_tunneled_reply", rlm_eap_ttls_t, NULL), .dflt = "no" },
{ FR_CONF_OFFSET("include_length", rlm_eap_ttls_t, include_length), .dflt = "yes" },
{ FR_CONF_OFFSET("require_client_cert", rlm_eap_ttls_t, req_client_cert), .dflt = "no" },
}
#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

Definition at line 66 of file rlm_eap_ttls.c.