The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Loading...
Searching...
No Matches
eap_md5.h
Go to the documentation of this file.
1#pragma once
2RCSIDH(eap_md5_h, "$Id: fc308de3e16de973357994e0d6d2caf7207678c6 $")
3
4#include <freeradius-devel/eap/base.h>
5
6#define FR_MD5_CHALLENGE 1
7#define FR_MD5_RESPONSE 2
8#define FR_MD5_SUCCESS 3
9#define FR_MD5_FAILURE 4
10#define FR_MD5_MAX_CODES 4
11
12#define MD5_HEADER_LEN 4
13#define MD5_CHALLENGE_LEN 16
14
15/*
16 ****
17 * EAP - MD5 does not specify code, id & length but chap specifies them,
18 * for generalization purpose, complete header should be sent
19 * and not just value_size, value and name.
20 * future implementation.
21 *
22 * Huh? What does that mean?
23 */
24
25/* eap packet structure */
26typedef struct {
27/*
28 uint8_t code;
29 uint8_t id;
30 uint16_t length;
31*/
33 uint8_t value_name[1];
35
36typedef struct {
37 unsigned char code;
38 unsigned char id;
39 unsigned short length;
40 unsigned char value_size;
41 unsigned char *value;
43
44/* function declarations here */
45
46int eap_md5_compose(eap_round_t *auth, MD5_PACKET *reply);
47MD5_PACKET *eap_md5_extract(request_t *request, eap_round_t *eap_round);
48int eap_md5_verify(request_t *request, MD5_PACKET *packet, fr_pair_t *password, uint8_t *challenge) CC_HINT(nonnull);
#define RCSIDH(h, id)
Definition build.h:488
Contains a pair of request and response packets.
Definition compose.h:48
int eap_md5_compose(eap_round_t *auth, MD5_PACKET *reply)
Definition eap_md5.c:171
int eap_md5_verify(request_t *request, MD5_PACKET *packet, fr_pair_t *password, uint8_t *challenge)
Definition eap_md5.c:116
unsigned char id
Definition eap_md5.h:38
uint8_t value_size
Definition eap_md5.h:32
unsigned short length
Definition eap_md5.h:39
unsigned char code
Definition eap_md5.h:37
unsigned char * value
Definition eap_md5.h:41
MD5_PACKET * eap_md5_extract(request_t *request, eap_round_t *eap_round)
Definition eap_md5.c:49
unsigned char value_size
Definition eap_md5.h:40
unsigned char uint8_t
Stores an attribute, a value and various bits of other data.
Definition pair.h:68
int nonnull(2, 5))