To request client authentication if we don't know the client's identity,
it's possible to use ID_ANY. However, if we don't change the identity
get_peer_id() would still report ID_ANY after the authentication.
DBG1(DBG_TLS, "received TLS peer certificate '%Y'",
cert->get_subject(cert));
first = FALSE;
+ if (this->peer && this->peer->get_type(this->peer) == ID_ANY)
+ {
+ this->peer->destroy(this->peer);
+ this->peer = cert->get_subject(cert);
+ this->peer = this->peer->clone(this->peer);
+ }
}
else
{