*/
bool initiator;
+ /**
+ * Send certificate requests?
+ */
+ bool send_req;
+
/** next message we expect */
enum {
CR_SA,
switch (sa_payload->get_auth_method(sa_payload))
{
+ case AUTH_HYBRID_INIT_RSA:
+ case AUTH_HYBRID_RESP_RSA:
+ if (!this->initiator)
+ {
+ this->send_req = FALSE;
+ }
+ /* FALL */
case AUTH_RSA:
case AUTH_XAUTH_INIT_RSA:
case AUTH_XAUTH_RESP_RSA:
this->state = CR_KE;
return NEED_MORE;
case CR_KE:
- build_certreqs(this, message);
+ if (this->send_req)
+ {
+ build_certreqs(this, message);
+ }
this->state = CR_AUTH;
return NEED_MORE;
case CR_AUTH:
.ike_sa = ike_sa,
.initiator = initiator,
.state = CR_SA,
+ .send_req = TRUE,
);
if (initiator)
{