The FreeRADIUS server $Id: f3670dba8951ca10eb4948feb3dc3db9423a334f $
Loading...
Searching...
No Matches
Data Structures | Macros | Functions | Variables
rlm_eap_psk.c File Reference

EAP-PSK (RFC 4764) interface to the EAP module. More...

#include <freeradius-devel/server/base.h>
#include <freeradius-devel/server/module_rlm.h>
#include <freeradius-devel/server/virtual_servers.h>
#include <freeradius-devel/unlang/module.h>
#include <freeradius-devel/unlang/call.h>
#include <freeradius-devel/protocol/eap/psk/freeradius.h>
#include "crypto.h"
+ Include dependency graph for rlm_eap_psk.c:

Go to the source code of this file.

Data Structures

struct  rlm_eap_psk_t
 

Macros

#define EAP_PSK_MPPE_KEY_LEN   32
 

Functions

static unlang_action_t mod_encode (unlang_result_t *p_result, UNUSED module_ctx_t const *mctx, request_t *request)
 Translate the state machine's reply Packet-Type into an EAP result.
 
static unlang_action_t mod_process (unlang_result_t *p_result, module_ctx_t const *mctx, request_t *request)
 Derive the next Packet-Type from the session state, and enter the virtual server.
 
static unlang_action_t mod_session_init (unlang_result_t *p_result, module_ctx_t const *mctx, request_t *request)
 

Variables

static fr_dict_attr_t const * attr_ms_mppe_recv_key
 
static fr_dict_attr_t const * attr_ms_mppe_send_key
 
static fr_dict_t const * dict_eap_psk
 
static fr_dict_t const * dict_radius
 
rlm_eap_submodule_t rlm_eap_psk
 
fr_dict_autoload_t rlm_eap_psk_dict []
 
fr_dict_attr_autoload_t rlm_eap_psk_dict_attr []
 
static conf_parser_t submodule_config []
 

Detailed Description

EAP-PSK (RFC 4764) interface to the EAP module.

Id
170ddc549833688b444471d7b2a59fb562eb7bfd

The protocol state machine, message parsing, and cryptography all live in the eap_psk process module (src/process/eap_psk). This submodule derives the next Packet-Type from the session state, pushes the request into the configured eap-psk virtual server, and translates the reply Packet-Type back into an EAP result.

Definition in file rlm_eap_psk.c.


Data Structure Documentation

◆ rlm_eap_psk_t

struct rlm_eap_psk_t

Definition at line 42 of file rlm_eap_psk.c.

+ Collaboration diagram for rlm_eap_psk_t:
Data Fields
virtual_server_t * virtual_server eap-psk virtual server providing the policy sections for the exchange.

Macro Definition Documentation

◆ EAP_PSK_MPPE_KEY_LEN

#define EAP_PSK_MPPE_KEY_LEN   32

Definition at line 81 of file rlm_eap_psk.c.

Function Documentation

◆ mod_encode()

static unlang_action_t mod_encode ( unlang_result_t p_result,
UNUSED module_ctx_t const *  mctx,
request_t request 
)
static

Translate the state machine's reply Packet-Type into an EAP result.

Runs after the virtual server (and the eap_psk process module inside of it) finishes with this round.

Definition at line 88 of file rlm_eap_psk.c.

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

◆ mod_process()

static unlang_action_t mod_process ( unlang_result_t p_result,
module_ctx_t const *  mctx,
request_t request 
)
static

Derive the next Packet-Type from the session state, and enter the virtual server.

Definition at line 133 of file rlm_eap_psk.c.

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

◆ mod_session_init()

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

Definition at line 185 of file rlm_eap_psk.c.

+ Here is the call graph for this function:

Variable Documentation

◆ attr_ms_mppe_recv_key

fr_dict_attr_t const* attr_ms_mppe_recv_key
static

Definition at line 68 of file rlm_eap_psk.c.

◆ attr_ms_mppe_send_key

fr_dict_attr_t const* attr_ms_mppe_send_key
static

Definition at line 67 of file rlm_eap_psk.c.

◆ dict_eap_psk

fr_dict_t const* dict_eap_psk
static

Definition at line 57 of file rlm_eap_psk.c.

◆ dict_radius

fr_dict_t const* dict_radius
static

Definition at line 58 of file rlm_eap_psk.c.

◆ rlm_eap_psk

rlm_eap_submodule_t rlm_eap_psk
Initial value:
= {
.common = {
.name = "eap_psk",
.inst_size = sizeof(rlm_eap_psk_t),
},
.provides = { FR_EAP_METHOD_PSK },
.session_init = mod_session_init,
.namespace = &dict_eap_psk
}
#define MODULE_MAGIC_INIT
Stop people using different module/library/server versions together.
Definition dl_module.h:63
@ FR_EAP_METHOD_PSK
Definition types.h:93
static const conf_parser_t config[]
Definition base.c:162
static fr_dict_t const * dict_eap_psk
Definition rlm_eap_psk.c:57
static conf_parser_t submodule_config[]
Definition rlm_eap_psk.c:47
static unlang_action_t mod_session_init(unlang_result_t *p_result, module_ctx_t const *mctx, request_t *request)

Definition at line 201 of file rlm_eap_psk.c.

◆ rlm_eap_psk_dict

fr_dict_autoload_t rlm_eap_psk_dict
Initial value:
= {
{ .out = &dict_eap_psk, .base_dir = "eap/psk", .proto = "eap-psk" },
{ .out = &dict_radius, .proto = "radius" },
}
#define DICT_AUTOLOAD_TERMINATOR
Definition dict.h:311
static fr_dict_t const * dict_radius
Definition rlm_eap_psk.c:58

Definition at line 61 of file rlm_eap_psk.c.

◆ rlm_eap_psk_dict_attr

fr_dict_attr_autoload_t rlm_eap_psk_dict_attr
Initial value:
= {
{ .out = &attr_ms_mppe_send_key, .name = "Vendor-Specific.Microsoft.MPPE-Send-Key", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
{ .out = &attr_ms_mppe_recv_key, .name = "Vendor-Specific.Microsoft.MPPE-Recv-Key", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
}
@ FR_TYPE_OCTETS
Raw octets.
static fr_dict_attr_t const * attr_ms_mppe_send_key
Definition rlm_eap_psk.c:67
static fr_dict_attr_t const * attr_ms_mppe_recv_key
Definition rlm_eap_psk.c:68

Definition at line 71 of file rlm_eap_psk.c.

◆ submodule_config

conf_parser_t submodule_config[]
static
Initial value:
= {
.process_module_name = "eap_psk",
} },
}
#define CONF_PARSER_TERMINATOR
Definition cf_parse.h:669
@ CONF_FLAG_REQUIRED
Error out if no matching CONF_PAIR is found, and no dflt value is set.
Definition cf_parse.h:429
#define FR_CONF_OFFSET_TYPE_FLAGS(_name, _type, _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:238
@ FR_TYPE_VOID
User data.
int virtual_server_cf_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, UNUSED conf_parser_t const *rule)
Wrapper for the config parser to allow pass1 resolution of virtual servers.
Additional validation rules for virtual server lookup.

Definition at line 47 of file rlm_eap_psk.c.