Support verification of RADIUS request messages

This commit is contained in:
Martin Willi
2012-03-05 18:06:13 +01:00
parent 3bc1829211
commit e8a8179706
2 changed files with 10 additions and 3 deletions
@@ -319,7 +319,14 @@ METHOD(radius_message_t, verify, bool,
/* replace Response by Request Authenticator for verification */
memcpy(res_auth, this->msg->authenticator, HASH_SIZE_MD5);
memcpy(this->msg->authenticator, req_auth, HASH_SIZE_MD5);
if (req_auth)
{
memcpy(this->msg->authenticator, req_auth, HASH_SIZE_MD5);
}
else
{
memset(this->msg->authenticator, 0, HASH_SIZE_MD5);
}
msg = chunk_create((u_char*)this->msg, ntohs(this->msg->length));
/* verify Response-Authenticator */