VALUE_PAIR *cur_config_item;
VALUE_PAIR *password_pair;
VALUE_PAIR *auth_item;
- char string[MAX_STRING_LEN];
+ uint8_t my_chap[MAX_STRING_LEN];
int auth_type = -1;
int result;
int auth_type_count = 0;
return -1;
}
- rad_chap_encode(request->packet, string,
- auth_item->vp_strvalue[0], password_pair);
+ rad_chap_encode(request->packet, my_chap,
+ auth_item->vp_octets[0], password_pair);
/*
* Compare them
*/
- if (memcmp(string + 1, auth_item->vp_strvalue + 1,
+ if (memcmp(my_chap + 1, auth_item->vp_strvalue + 1,
CHAP_VALUE_LENGTH) != 0) {
DEBUG2("auth: user supplied CHAP-Password does NOT match local User-Password");
return -1;
/* double check: maybe the secret is wrong? */
if ((debug_flag > 1) && (auth_item != NULL) &&
(auth_item->attribute == PW_USER_PASSWORD)) {
- u_char *p;
+ char *p;
p = auth_item->vp_strvalue;
while (*p != '\0') {
*/
if (passwd->attribute == PW_CLEARTEXT_PASSWORD) {
librad_md5_calc(hash, &a1[0], a1_len);
- lrad_bin2hex(hash, &a1[0], 16);
+ lrad_bin2hex(hash, (char *) &a1[0], 16);
} else { /* MUST be Digest-HA1 */
memcpy(&a1[0], passwd->vp_strvalue, 32);
}
} else {
memcpy(&hash[0], &a1[0], a1_len);
}
- lrad_bin2hex(hash, kd, sizeof(hash));
+ lrad_bin2hex(hash, (char *) kd, sizeof(hash));
#ifndef NDEBUG
if (debug_flag) {
librad_md5_calc(&hash[0], &a2[0], a2_len);
- lrad_bin2hex(hash, kd + kd_len, sizeof(hash));
+ lrad_bin2hex(hash, (char *) kd + kd_len, sizeof(hash));
#ifndef NDEBUG
if (debug_flag) {
return RLM_MODULE_INVALID;
}
- if (lrad_hex2bin(&vp->vp_octets[0], &hash[0], vp->length >> 1) != (vp->length >> 1)) {
+ if (lrad_hex2bin(&vp->vp_strvalue[0], &hash[0], vp->length >> 1) != (vp->length >> 1)) {
DEBUG2("rlm_digest: Invalid text in Digest-Response");
return RLM_MODULE_INVALID;
}
} else { /* MUST be NT-Password */
if (password->length == 32) {
password->length = lrad_hex2bin(password->vp_strvalue,
- password->vp_strvalue,
+ password->vp_octets,
16);
}
if (password->length != 16) {
unsigned char ntpwdhash[16], ntpwdhashhash[16];
unsigned char buffer[256];
LEAP_PACKET *reply;
- char *p;
+ unsigned char *p;
VALUE_PAIR *vp;
/*