*/
/* ASCII decode; this is why OTP_MAX_RADSTATE_LEN has +1 */
- (void) memcpy(rad_state, vp->vp_strvalue, vp->length);
+ (void) memcpy(rad_state, vp->strvalue, vp->length);
rad_state[e_length] = '\0';
if (otp_a2x(rad_state, raw_state) == -1) {
- (void) radlog(L_AUTH, "rlm_otp: %s: bad state for [%s]: not hex",
+ (void) radlog(L_AUTH, "rlm_otp: %s: bad radstate for [%s]: not hex",
__func__, username);
return RLM_MODULE_INVALID;
}
return RLM_MODULE_FAIL;
}
/* compare generated state against returned state to verify hmac */
- if (memcmp(state, vp->vp_strvalue, vp->length)) {
+ if (memcmp(state, vp->strvalue, vp->length)) {
- (void) radlog(L_AUTH, "rlm_otp: %s: bad state for [%s]: hmac",
+ (void) radlog(L_AUTH, "rlm_otp: %s: bad radstate for [%s]: hmac",
__func__, username);
return RLM_MODULE_REJECT;
}