24 RCSID(
"$Id: 8aff65ee19d9605cdc242fc709bdf934bfb61dc9 $")
26 #include <freeradius-devel/server/password.h>
27 #include <freeradius-devel/util/debug.h>
28 #include <freeradius-devel/util/md5.h>
29 #include <freeradius-devel/util/rand.h>
66 known_good =
password_find(&ephemeral, request, request->parent,
70 REDEBUG(
"No \"known good\" password found for user");
79 if (ephemeral) TALLOC_FREE(known_good);
107 if (ephemeral) TALLOC_FREE(known_good);
143 RDEBUG2(
"Issuing MD5 Challenge");
unlang_action_t
Returned by unlang_op_t calls, determine the next action of the interpreter.
eap_packet_t * request
Packet we will send to the peer.
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.
MD5_PACKET * eap_md5_extract(request_t *request, eap_round_t *eap_round)
int eap_md5_verify(request_t *request, MD5_PACKET *packet, fr_pair_t *password, uint8_t *challenge)
int eap_md5_compose(eap_round_t *eap_round, MD5_PACKET *reply)
#define MD5_CHALLENGE_LEN
void * opaque
Opaque data used by EAP methods.
module_method_t process
Callback that should be used to process the next round.
request_t * request
Current request.
eap_round_t * this_round
The EAP response we're processing, and the EAP request we're building.
static eap_session_t * eap_session_get(request_t *request)
Tracks the progress of a single session of any EAP method.
@ FR_TYPE_STRING
String of printable characters.
Temporary structure to hold arguments for module calls.
fr_pair_t * password_find(bool *ephemeral, TALLOC_CTX *ctx, request_t *request, fr_dict_attr_t const *allowed_attrs[], size_t allowed_attrs_len, bool normify)
Find a "known good" password in the control list of a request.
uint32_t fr_rand(void)
Return a 32-bit random number.
#define RETURN_MODULE_HANDLED
#define RETURN_MODULE_INVALID
rlm_rcode_t
Return codes indicating the result of the module call.
fr_dict_autoload_t rlm_eap_md5_dict[]
static fr_dict_t const * dict_freeradius
static unlang_action_t mod_session_init(rlm_rcode_t *p_result, UNUSED module_ctx_t const *mctx, request_t *request)
rlm_eap_submodule_t rlm_eap_md5
static fr_dict_attr_t const * attr_cleartext_password
fr_dict_attr_autoload_t rlm_eap_md5_dict_attr[]
static unlang_action_t mod_process(rlm_rcode_t *p_result, UNUSED module_ctx_t const *mctx, request_t *request)
MEM(pair_append_request(&vp, attr_eap_aka_sim_identity) >=0)
Stores an attribute, a value and various bits of other data.
module_t common
Common fields provided by all modules.
Interface exported by EAP submodules.