Chap Password example?
jenny
liew.jenny at gmail.com
Tue Jun 14 11:53:22 CEST 2011
Hello,
I have some enquiry on CHAP-Password for authentication. I'm trying to using
CHAP-Password using freeradius client. Trying to look for some example but
it seems there's no much example code i can use as a reference. Just
wondering how can i do that? initially, i'm using PW_USER_PASSWORD and it
works fine. here is my example code.
if (rc_avpair_add(rh, &send, PW_USER_NAME, username, -1, 0) == NULL)
{
return ERROR_RC;
}
// fill in User-Password
if (rc_avpair_add(rh, &send, PW_USER_PASSWORD, passwd, -1, 0) == NULL)
{
return ERROR_RC;
}
but i would like to change to CHAP-Password method, i understand i need to
add the PW_CHAP_CHALLENGE as well. But I not sure how do i do that?
if (rc_avpair_add(rh, &send, PW_USER_NAME, username, -1, 0) == NULL)
{
return ERROR_RC;
}
// fill in Set CHAP Password
if (rc_avpair_add(rh, &send, PW_CHAP_PASSWORD, passwd, -1, 0) == NULL)
{
return ERROR_RC;
}
chap_state * cstate;
rc_avpair_add(&send, PW_CHAP_CHALLENGE, cstate->challenge,
cstate->chal_len);
I'm having problem on the chap_state, it couldn't find the defination. I
have installed pppd-2.4.5, but i couldn't find the library. Anyone can guide
me through how do i do chap-password please?
Also i have read the spec and some previous old thread, it said i need to do
some calculation on specific crypto calculations. I not quite understand
this, is there anyone can explain how do i do this?
I guess there's some challenge string i need to pass in for
PW_CHAP_CHALLENGE? what should assign to it?
Any help/advice is very appreciate.
Many thanks.
regards,
Jenny
--
View this message in context: http://freeradius.1045715.n5.nabble.com/Chap-Password-example-tp4487335p4487335.html
Sent from the FreeRadius - User mailing list archive at Nabble.com.
More information about the Freeradius-Users
mailing list