Lines Matching refs:cstate
21 show_response(chap_state *cstate, const char *str) in show_response() argument
25 printf("%s -- %d bytes:", str, cstate->resp_length); in show_response()
27 for (i = 0; i < cstate->resp_length; i++) { in show_response()
30 printf("%02X ", (unsigned int)cstate->response[i]); in show_response()
42 chap_state cstate; local
58 BZERO(&cstate, sizeof(cstate));
59 ChapMS(&cstate, challenge, sizeof(challenge), argv[2], strlen(argv[2]));
61 show_response(&cstate, "MS-CHAPv1 with LAN Manager");
63 show_response(&cstate, "MS-CHAPv1");
66 cstate.chal_len = sizeof(challenge);
67 BCOPY(challenge, cstate.challenge, cstate.chal_len);
68 if (!ChapMSValidate(&cstate, cstate.response, cstate.resp_length,
73 cstate.response[MS_CHAP_RESPONSE_LEN-1] = '\0';
74 if (!ChapMSValidate(&cstate, cstate.response, cstate.resp_length,
80 cstate.resp_name = "joe user";
81 ChapMSv2(&cstate, cstate.challenge, 16, argv[2], strlen(argv[2]));
82 show_response(&cstate, "MS-CHAPv2");
83 if (!ChapMSv2Validate(&cstate, cstate.resp_name, cstate.response,
84 cstate.resp_length, argv[2], strlen(argv[2])))