4 #include <freeradius-devel/ident.h>
5 RCSIDH(eap_leap_h, "$Id$")
9 #define PW_LEAP_CHALLENGE 1
10 #define PW_LEAP_RESPONSE 2
11 #define PW_LEAP_SUCCESS 3
12 #define PW_LEAP_FAILURE 4
13 #define PW_LEAP_MAX_CODES 4
16 * Version + unused + count
18 #define LEAP_HEADER_LEN 3
22 * EAP - LEAP doesnot specify code, id & length but chap specifies them,
23 * for generalization purpose, complete header should be sent
24 * and not just value_size, value and name.
25 * future implementation.
28 /* eap packet structure */
29 typedef struct leap_packet_t {
31 * EAP header, followed by type comes before this.
36 uint8_t challenge[1]; /* 8 or 24, followed by user name */
40 * Which is decoded into this.
42 typedef struct leap_packet {
47 unsigned char *challenge;
53 * The information which must be kept around
54 * during the LEAP session.
56 typedef struct leap_session_t {
58 uint8_t peer_challenge[8];
59 uint8_t peer_response[24];
62 /* function declarations here */
64 LEAP_PACKET *eapleap_alloc(void);
65 void eapleap_free(LEAP_PACKET **leap_packet_ptr);
67 int eapleap_compose(EAP_DS *auth, LEAP_PACKET *reply);
68 LEAP_PACKET *eapleap_extract(EAP_DS *auth);
69 LEAP_PACKET *eapleap_initiate(EAP_DS *eap_ds, VALUE_PAIR *user_name);
70 int eapleap_stage4(LEAP_PACKET *packet, VALUE_PAIR* password,
71 leap_session_t *session);
72 LEAP_PACKET *eapleap_stage6(LEAP_PACKET *packet, REQUEST *request,
73 VALUE_PAIR *user_name, VALUE_PAIR* password,
74 leap_session_t *session,
75 VALUE_PAIR **reply_vps);
77 void eapleap_lmpwdhash(const unsigned char *password,unsigned char *lmhash);
78 void eapleap_mschap(const unsigned char *win_password,
79 const unsigned char *challenge, unsigned char *response);
81 #endif /*_EAP_LEAP_H*/