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: c78cda6c49b1a6119d634389b9f1e93e944f3ad3 $")
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;
42 char *name;
44
45/* function declarations here */
46
47int eap_md5_compose(eap_round_t *auth, MD5_PACKET *reply);
49int eap_md5_verify(request_t *request, MD5_PACKET *pkt, fr_pair_t* pwd, uint8_t *ch);
#define RCSIDH(h, id)
Definition build.h:484
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:179
unsigned char id
Definition eap_md5.h:38
int eap_md5_verify(request_t *request, MD5_PACKET *pkt, fr_pair_t *pwd, uint8_t *ch)
Definition eap_md5.c:129
uint8_t value_size
Definition eap_md5.h:32
MD5_PACKET * eap_md5_extract(request_t *request, eap_round_t *auth)
Definition eap_md5.c:49
unsigned short length
Definition eap_md5.h:39
unsigned char code
Definition eap_md5.h:37
unsigned char * value
Definition eap_md5.h:41
char * name
Definition eap_md5.h:42
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