[SOLVED] CHAP Modification

Alan DeKok aland at deployingradius.com
Wed Feb 28 09:51:17 CET 2007


ChristosH wrote:
> Okay, in the radius.c file they call a function rad_chap_encode() that uses
> the password attribute.
> Is that what I'm looking for?

  Yes.

> It's a VALUE_PAIR type, so could I check and modify the password->length and
> password->strvalue in that function?

  Huh?  Why?  Do it elsewhere.

> Or should I back out and modify it in the auth.c rad_check_password () where
> it's called? I won't run into any issues if I modify the VALUE_PAIR values,
> will I?

  No.  I would suggest patching the server as little as possible.

> Also, is there a C function included in the libraries that will allow me to
> convert a hex string to binary? I'm worried I might get stuck in ASCII ->
> HEX -> BINARY conversions.

  Yes.  see "bin2hex" and "hex2bin".  See also rlm_pap in 1.1.4, which
does a lot of this kind of normalization already.

  Alan DeKok.
--
  http://deployingradius.com       - The web site of the book
  http://deployingradius.com/blog/ - The blog



More information about the Freeradius-Users mailing list