Hi everyone,

Need help for modifying the radius client or updating for CHAP authentication,

Modified the below attribute, instead of PW_USER_PASSWORD to PW_CHAP_PASSWORD, but its rejecting please do know if i'm wrong or/and have to take care of any other aspect.

With PAP(PW_USER_PASSWORD)it works fine.

Have verified by command line it works fine,

$echo "User-Name=steve,CHAP-Password=testing,Framed-Protocol=PPP" | radclient localhost:1812 auth testing123


---Code snippet--
/*if (rc_avpair_add(rh, &send, PW_USER_PASSWORD, passwd, -1, 0) == NULL)
return ERROR_RC;*/
//VALUE_PAIR
if (rc_avpair_add(rh, &send, PW_CHAP_PASSWORD, passwd, -1, 0) == NULL)
return ERROR_RC;
/*
* Fill in Service-Type
*/

service = PW_AUTHENTICATE_ONLY;
if (rc_avpair_add(rh, &send, PW_SERVICE_TYPE, &service, -1, 0) == NULL)
return ERROR_RC;

result = rc_auth(rh, 0, send, &received, msg);

--End code snippet --


Thanks in Advance
-Santosh

Cheers,
Santosh Kumar
Sr Software Engineer
Cell:09881481468


Computers can never replace human stupidity.