293
291
peer_cfg = peer_cfg_create(
294
name, 2, ike, local_id, remote_id, cert_policy, uniqueid,
292
name, 2, ike, cert_policy, uniqueid,
295
293
keyingtries, rekeytime, reauthtime, jitter, overtime,
296
294
mobike, dpd_delay, vip, pool,
297
295
mediation, mediated_cfg, peer_id);
298
auth = peer_cfg->get_auth(peer_cfg);
299
auth->add_item(auth, AUTHN_AUTH_CLASS, &auth_method);
296
auth = auth_cfg_create();
297
auth->add(auth, AUTH_RULE_AUTH_CLASS, auth_method);
298
auth->add(auth, AUTH_RULE_IDENTITY, local_id->clone(local_id));
299
peer_cfg->add_auth_cfg(peer_cfg, auth, TRUE);
300
auth = auth_cfg_create();
301
auth->add(auth, AUTH_RULE_IDENTITY, remote_id->clone(remote_id));
302
auth->add_item(auth, AUTHN_EAP_TYPE, &eap_type);
304
auth->add(auth, AUTH_RULE_AUTH_CLASS, AUTH_CLASS_EAP);
305
auth->add(auth, AUTH_RULE_EAP_TYPE, eap_type);
305
auth->add_item(auth, AUTHN_EAP_VENDOR, &eap_vendor);
308
auth->add(auth, AUTH_RULE_EAP_VENDOR, eap_vendor);
311
peer_cfg->add_auth_cfg(peer_cfg, auth, FALSE);
308
312
add_child_cfgs(this, peer_cfg, id);