Lines Matching refs:auth
64 #include "auth.h"
221 /* Generate AUTHRESPONSE to verify on auth success */
320 chap->auth.physical->dl->bundle, 0, pid);
330 write(in[1], chap->auth.in.name, strlen(chap->auth.in.name));
376 ans = chap_BuildAnswer(name, key, chap->auth.id, chap->challenge.peer
383 ChapOutput(chap->auth.physical, CHAP_RESPONSE, chap->auth.id,
391 ChapOutput(chap->auth.physical, CHAP_FAILURE, chap->auth.id,
454 int lanman = chap->auth.physical->link.lcp.his_authtype == 0x80 &&
456 IsAccepted(chap->auth.physical->link.lcp.cfg.chap80lm)) ||
457 !IsAccepted(chap->auth.physical->link.lcp.cfg.chap80nt));
469 , chap->auth.physical->link.lcp.his_authtype, lanman
493 len = strlen(authp->physical->dl->bundle->cfg.auth.name);
519 memcpy(cp, authp->physical->dl->bundle->cfg.auth.name, len);
532 len = strlen(authp->physical->dl->bundle->cfg.auth.name);
660 chap_Challenge(&chap->auth);
678 auth_Init(&chap->auth, p, chap_Challenge, chap_Success, chap_Failure);
719 if ((bp = auth_ReadHeader(&chap->auth, bp)) == NULL &&
720 ntohs(chap->auth.in.hdr.length) == 0)
722 else if (chap->auth.in.hdr.code == 0 || chap->auth.in.hdr.code > MAXCHAPCODE)
724 chap->auth.in.hdr.code);
729 if (chap->auth.in.hdr.code != CHAP_CHALLENGE &&
730 chap->auth.id != chap->auth.in.hdr.id &&
734 chapcodes[chap->auth.in.hdr.code], chap->auth.in.hdr.id,
735 chap->auth.id);
739 chap->auth.id = chap->auth.in.hdr.id; /* We respond with this id */
744 switch (chap->auth.in.hdr.code) {
755 bp = auth_ReadName(&chap->auth, bp, len);
762 chap_ChallengeInit(&chap->auth);
767 auth_StopTimer(&chap->auth);
780 *ans = chap->auth.id;
782 bp = auth_ReadName(&chap->auth, bp, len);
791 /* chap->auth.in.name is already set up at CHALLENGE time */
802 switch (chap->auth.in.hdr.code) {
805 if (*chap->auth.in.name)
807 chapcodes[chap->auth.in.hdr.code], alen,
808 chap->auth.in.name,
810 lanman && chap->auth.in.hdr.code == CHAP_RESPONSE ?
816 chapcodes[chap->auth.in.hdr.code], alen,
818 lanman && chap->auth.in.hdr.code == CHAP_RESPONSE ?
828 chapcodes[chap->auth.in.hdr.code], ans);
831 chapcodes[chap->auth.in.hdr.code]);
835 switch (chap->auth.in.hdr.code) {
837 if (*bundle->cfg.auth.key == '!' && bundle->cfg.auth.key[1] != '!')
838 chap_StartChild(chap, bundle->cfg.auth.key + 1,
839 bundle->cfg.auth.name);
841 chap_Respond(chap, bundle->cfg.auth.name, bundle->cfg.auth.key +
842 (*bundle->cfg.auth.key == '!' ? 1 : 0)
851 name = chap->auth.in.name;
865 if (!radius_Authenticate(&bundle->radius, &chap->auth,
866 chap->auth.in.name, ans, alen + 1,
869 chap_Failure(&chap->auth);
903 char *myans = chap_BuildAnswer(name, key, chap->auth.id,
928 chap_Success(&chap->auth);
930 chap_Failure(&chap->auth);