make peer IP address and peer IP available to the xauth_module.verify_secret() method

This commit is contained in:
Andreas Steffen
2008-04-02 19:04:45 +00:00
parent 97da3d2de0
commit f342cc08c0
4 changed files with 20 additions and 6 deletions
+8 -3
View File
@@ -967,6 +967,12 @@ xauth_inR1(struct msg_digest *md)
}
else
{
xauth_peer_t peer;
peer.conn_name = st->st_connection->name;
addrtot(&md->sender, 0, peer.ip_address, sizeof(peer.ip_address));
idtoa(&md->st->st_connection->spd.that.id, peer.id, sizeof(peer.id));
DBG(DBG_CONTROL,
DBG_log("peer xauth user name is '%.*s'"
, ia.xauth_secret.user_name.len
@@ -977,9 +983,8 @@ xauth_inR1(struct msg_digest *md)
, ia.xauth_secret.user_password.len
, ia.xauth_secret.user_password.ptr)
)
/* verify the user credentials using a plugn function */
st->st_xauth.status = xauth_module.verify_secret(st->st_connection->name
, &ia.xauth_secret);
/* verify the user credentials using a plugin function */
st->st_xauth.status = xauth_module.verify_secret(&peer, &ia.xauth_secret);
plog("extended authentication %s", st->st_xauth.status? "was successful":"failed");
}