37 RCSID(
"$Id: 243a8ed880e5053f43c252c378f17ec303a95287 $")
41 #include <freeradius-devel/eap/base.h>
44 #include <freeradius-devel/util/md5.h>
53 unsigned short name_len;
72 if (!packet)
return NULL;
100 if (!packet->
value) {
112 packet->
name = talloc_array(packet,
char, name_len + 1);
119 packet->
name[name_len] = 0;
141 REDEBUG(
"Expected 16 bytes of response to challenge, got %d", packet->
value_size);
153 memcpy(ptr, password->vp_strvalue, password->vp_length);
154 ptr += password->vp_length;
155 len += password->vp_length;
182 unsigned short name_len;
188 if (reply->
code < 3) {
213 if (name_len && reply->
name) {
215 memcpy(ptr, reply->
name, name_len);
eap_packet_t * response
Packet we received from the peer.
eap_packet_t * request
Packet we will send to the peer.
Contains a pair of request and response packets.
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 fr_md5_calc(uint8_t out[static MD5_DIGEST_LENGTH], uint8_t const *in, size_t inlen)
Perform a single digest operation on a single input buffer.
int fr_digest_cmp(uint8_t const *a, uint8_t const *b, size_t length)
Do a comparison of two authentication digests by comparing the FULL data.
Stores an attribute, a value and various bits of other data.
#define FR_MAX_STRING_LEN