4 #define CHAP_DIGEST_MD5 5
5 #define CHAP_DIGEST_SHA 6
7 #define CHAP_CHALLENGE_LENGTH 16
8 #define CHAP_CHALLENGE_STR_LEN 4096
9 #define MAX_RESPONSE_LENGTH 64 /* sufficient for MD5 */
10 #define MAX_CHAP_N_SIZE 512
12 #define MD5_SIGNATURE_SIZE 16 /* 16 bytes in a MD5 message digest */
14 #define CHAP_STAGE_CLIENT_A 1
15 #define CHAP_STAGE_SERVER_AIC 2
16 #define CHAP_STAGE_CLIENT_NR 3
17 #define CHAP_STAGE_CLIENT_NRIC 4
18 #define CHAP_STAGE_SERVER_NR 5
20 extern u32 chap_main_loop(struct iscsi_conn *, struct iscsi_node_auth *, char *, char *,
24 unsigned char digest_type;
26 unsigned char challenge[CHAP_CHALLENGE_LENGTH];
27 unsigned int authenticate_target;
28 unsigned int chap_state;
29 } ____cacheline_aligned;
31 #endif /*** _ISCSI_CHAP_H_ ***/