6 #define PW_MD5_CHALLENGE 1
7 #define PW_MD5_RESPONSE 2
8 #define PW_MD5_SUCCESS 3
9 #define PW_MD5_FAILURE 4
10 #define PW_MD5_MAX_CODES 4
12 #define MD5_HEADER_LEN 4
13 #define MD5_CHALLENGE_LEN 16
17 * EAP - MD5 doesnot 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.
22 * Huh? What does that mean?
25 /* eap packet structure */
26 typedef struct md5_packet_t {
33 uint8_t value_name[1];
36 typedef struct md5_packet {
39 unsigned short length;
40 unsigned char value_size;
45 /* function declarations here */
47 MD5_PACKET *eapmd5_alloc(void);
48 void eapmd5_free(MD5_PACKET **md5_packet_ptr);
50 int eapmd5_compose(EAP_DS *auth, MD5_PACKET *reply);
51 MD5_PACKET *eapmd5_extract(EAP_DS *auth);
52 int eapmd5_verify(MD5_PACKET *pkt, VALUE_PAIR* pwd, uint8_t *ch);