Commit 1372e8a2 authored by Ad Schellevis's avatar Ad Schellevis Committed by GitHub

Merge pull request #1160 from fabianfrz/add_constraint

Camellia can only be used with IKEv2
parents 82bece2a a5e24cad
...@@ -200,6 +200,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -200,6 +200,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$reqdfieldsn = array(gettext("Certificate Authority"),gettext("Certificate")); $reqdfieldsn = array(gettext("Certificate Authority"),gettext("Certificate"));
break; break;
} }
if (empty($pconfig['mobile'])) { if (empty($pconfig['mobile'])) {
$reqdfields[] = "remote-gateway"; $reqdfields[] = "remote-gateway";
$reqdfieldsn[] = gettext("Remote gateway"); $reqdfieldsn[] = gettext("Remote gateway");
...@@ -331,6 +332,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -331,6 +332,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
if (!empty($pconfig['ealgo_keylen'])) { if (!empty($pconfig['ealgo_keylen'])) {
$pconfig['encryption-algorithm']['keylen'] = $pconfig['ealgo_keylen']; $pconfig['encryption-algorithm']['keylen'] = $pconfig['ealgo_keylen'];
} }
if (!empty($pconfig['iketype']) && !empty($pconfig['encryption-algorithm']['name']) && $pconfig['iketype'] != 'ikev2' && $pconfig['encryption-algorithm']['name'] == 'camellia') {
$input_errors[] = sprintf(gettext("%s can only be used with IKEv2 type VPNs."), 'Camellia');
}
if (count($input_errors) == 0) { if (count($input_errors) == 0) {
$copy_fields = "ikeid,iketype,interface,mode,protocol,myid_type,myid_data $copy_fields = "ikeid,iketype,interface,mode,protocol,myid_type,myid_data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment