24 #include <freeradius-devel/server/protocol.h>
25 #include <freeradius-devel/util/debug.h>
26 #include <freeradius-devel/protocol/tls/freeradius.h>
55 #define FR_TLS_PACKET_CODE_VALID(_code) (((_code) > 0) && ((_code) <= FR_PACKET_TYPE_VALUE_NOTFOUND))
57 #define PROCESS_INST process_tls_t
58 #define PROCESS_PACKET_TYPE uint32_t
59 #define PROCESS_PACKET_CODE_VALID FR_TLS_PACKET_CODE_VALID
61 #include <freeradius-devel/server/process.h>
64 [FR_PACKET_TYPE_VALUE_LOAD_SESSION] = {
78 .resume = resume_recv_no_send,
79 .section_offset = PROCESS_CONF_OFFSET(load_session),
81 [FR_PACKET_TYPE_VALUE_STORE_SESSION] = {
95 .resume = resume_recv_no_send,
96 .section_offset = PROCESS_CONF_OFFSET(store_session),
98 [FR_PACKET_TYPE_VALUE_CLEAR_SESSION] = {
111 .recv = recv_generic,
112 .resume = resume_recv_no_send,
113 .section_offset = PROCESS_CONF_OFFSET(clear_session),
115 [FR_PACKET_TYPE_VALUE_VERIFY_CERTIFICATE] = {
128 .recv = recv_generic,
129 .resume = resume_recv_no_send,
130 .section_offset = PROCESS_CONF_OFFSET(verify_certificate),
136 fr_process_state_t
const *state;
142 request->component =
"tls";
143 request->module = NULL;
146 UPDATE_STATE(packet);
150 return state->recv(p_result, mctx, request);
157 .offset = PROCESS_CONF_OFFSET(store_session)
162 .offset = PROCESS_CONF_OFFSET(load_session)
167 .offset = PROCESS_CONF_OFFSET(clear_session)
172 .offset = PROCESS_CONF_OFFSET(verify_certificate)
unlang_action_t
Returned by unlang_op_t calls, determine the next action of the interpreter.
A section grouping multiple CONF_PAIR.
fr_dict_attr_t const ** out
Where to write a pointer to the resolved fr_dict_attr_t.
fr_dict_t const ** out
Where to write a pointer to the loaded/resolved fr_dict_t.
Specifies an attribute which must be present for the module to function.
Specifies a dictionary which must be loaded/loadable for the module to function.
#define MODULE_MAGIC_INIT
Stop people using different module/library/server versions together.
fr_dict_attr_t const * attr_packet_type
void log_request_pair_list(fr_log_lvl_t lvl, request_t *request, fr_pair_t const *parent, fr_pair_list_t const *vps, char const *prefix)
Print a fr_pair_list_t.
@ L_DBG_LVL_1
Highest priority debug messages (-x).
@ FR_TYPE_UINT32
32 Bit unsigned integer.
unlang_mod_actions_t const mod_actions_authorize
module_instance_t const * mi
Instance of the module being instantiated.
Temporary structure to hold arguments for module calls.
static unlang_action_t mod_process(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
fr_process_module_t process_tls
static fr_dict_t const * dict_tls
static const virtual_server_compile_t compile_list[]
CONF_SECTION * store_session
static fr_process_state_t const process_state[]
fr_dict_autoload_t process_tls_dict[]
CONF_SECTION * load_session
CONF_SECTION * clear_session
fr_dict_attr_autoload_t process_tls_dict_attr[]
CONF_SECTION * verify_certificate
process_tls_sections_t sections
#define PROCESS_TRACE
Trace each state function as it's entered.
module_t common
Common fields for all loadable modules.
Common public symbol definition for all process modules.
rlm_rcode_t
Return codes indicating the result of the module call.
@ RLM_MODULE_INVALID
The module considers the request invalid.
@ RLM_MODULE_OK
The module is OK, continue.
@ RLM_MODULE_FAIL
Module failed, don't reply.
@ RLM_MODULE_DISALLOW
Reject the request (user is locked out).
@ RLM_MODULE_REJECT
Immediately reject the request.
@ RLM_MODULE_NOTFOUND
User not found.
@ RLM_MODULE_UPDATED
OK (pairs modified).
@ RLM_MODULE_NOOP
Module succeeded without doing anything.
#define SECTION_NAME(_name1, _name2)
Define a section name consisting of a verb and a noun.
void * data
Module's instance data.
#define talloc_get_type_abort_const
#define COMPILE_TERMINATOR
section_name_t const * section
Identifier for the section.
Processing sections which are allowed in this virtual server.