At 04:30 PM 11/12/2001 -0500, you wrote:
Possible solutions:
1. A perl routine to convert octal -> hex OR octal -> binary for use in
md5 for comparing chap-password to digest.
2. Make freeradius truly send data in Hex rather than octal (I have a guy
working on this now, will submit patch when done).
Seeing as solution 2 seemed easier.. here is the quick and dirty fix.
Simply added some lines to the /src/lib/print.c and recompiled... It is
now sending the chap passwd and challenge in hex.
switch (vp->type) {
case PW_TYPE_STRING:
if (vp->attribute == PW_NAS_PORT_ID)
a = (char *)vp->strvalue;
else if (vp->attribute == PW_CHAP_PASSWORD ||
vp->attribute == PW_CHAP_CHALLENGE) {
librad_hexprint((char *)vp->strvalue,
vp->length, buf, sizeof(buf));
a = buf;
} else {
Above is just a copy of that section of code. Note the else if, that's
where the dirty work is done.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html