Camellia can only be used with IKEv2

This commit is contained in:
Fabian Franz 2016-08-29 17:17:02 +02:00
parent a0664f1116
commit a5e24cadf5

View File

@ -200,6 +200,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$reqdfieldsn = array(gettext("Certificate Authority"),gettext("Certificate"));
break;
}
if (empty($pconfig['mobile'])) {
$reqdfields[] = "remote-gateway";
$reqdfieldsn[] = gettext("Remote gateway");
@ -331,6 +332,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
if (!empty($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) {
$copy_fields = "ikeid,iketype,interface,mode,protocol,myid_type,myid_data