4 #include <freeradius-devel/ident.h>
5 RCSIDH(eap_md5_h, "$Id$")
9 #define PW_MD5_CHALLENGE 1
10 #define PW_MD5_RESPONSE 2
11 #define PW_MD5_SUCCESS 3
12 #define PW_MD5_FAILURE 4
13 #define PW_MD5_MAX_CODES 4
15 #define MD5_HEADER_LEN 4
16 #define MD5_CHALLENGE_LEN 16
20 * EAP - MD5 doesnot specify code, id & length but chap specifies them,
21 * for generalization purpose, complete header should be sent
22 * and not just value_size, value and name.
23 * future implementation.
25 * Huh? What does that mean?
28 /* eap packet structure */
29 typedef struct md5_packet_t {
36 uint8_t value_name[1];
39 typedef struct md5_packet {
42 unsigned short length;
43 unsigned char value_size;
48 /* function declarations here */
50 MD5_PACKET *eapmd5_alloc(void);
51 void eapmd5_free(MD5_PACKET **md5_packet_ptr);
53 int eapmd5_compose(EAP_DS *auth, MD5_PACKET *reply);
54 MD5_PACKET *eapmd5_extract(EAP_DS *auth);
55 int eapmd5_verify(MD5_PACKET *pkt, VALUE_PAIR* pwd, uint8_t *ch);