Commit feae22dd authored by Ad Schellevis's avatar Ad Schellevis

(ipsec) cleanup unused ciphers, add null cipher for testing purposes, fix some...

(ipsec) cleanup unused ciphers, add null cipher for testing purposes, fix some php warnings on empty arrays
parent 2325fc61
...@@ -39,9 +39,6 @@ $ipsec_loglevels = array("dmn" => "Daemon", "mgr" => "SA Manager", "ike" => "IKE ...@@ -39,9 +39,6 @@ $ipsec_loglevels = array("dmn" => "Daemon", "mgr" => "SA Manager", "ike" => "IKE
$p1_ealgos = array( $p1_ealgos = array(
'aes' => array( 'name' => 'AES', 'keysel' => array( 'lo' => 128, 'hi' => 256, 'step' => 64 ) ), 'aes' => array( 'name' => 'AES', 'keysel' => array( 'lo' => 128, 'hi' => 256, 'step' => 64 ) ),
'aes128gcm' => array( 'name' => 'AES128-GCM', 'keysel' => array( 'lo' => 64, 'hi' => 128, 'step' => 32 ) ),
'aes192gcm' => array( 'name' => 'AES192-GCM', 'keysel' => array( 'lo' => 64, 'hi' => 128, 'step' => 32 ) ),
'aes256gcm' => array( 'name' => 'AES256-GCM', 'keysel' => array( 'lo' => 64, 'hi' => 128, 'step' => 32 ) ),
'blowfish' => array( 'name' => 'Blowfish', 'keysel' => array( 'lo' => 128, 'hi' => 256, 'step' => 64 ) ), 'blowfish' => array( 'name' => 'Blowfish', 'keysel' => array( 'lo' => 128, 'hi' => 256, 'step' => 64 ) ),
'3des' => array( 'name' => '3DES' ), '3des' => array( 'name' => '3DES' ),
'cast128' => array( 'name' => 'CAST128' ), 'cast128' => array( 'name' => 'CAST128' ),
...@@ -50,13 +47,11 @@ $p1_ealgos = array( ...@@ -50,13 +47,11 @@ $p1_ealgos = array(
$p2_ealgos = array( $p2_ealgos = array(
'aes' => array( 'name' => 'AES', 'keysel' => array( 'lo' => 128, 'hi' => 256, 'step' => 64 ) ), 'aes' => array( 'name' => 'AES', 'keysel' => array( 'lo' => 128, 'hi' => 256, 'step' => 64 ) ),
'aes128gcm' => array( 'name' => 'AES128-GCM', 'keysel' => array( 'lo' => 64, 'hi' => 128, 'step' => 32 ) ),
'aes192gcm' => array( 'name' => 'AES192-GCM', 'keysel' => array( 'lo' => 64, 'hi' => 128, 'step' => 32 ) ),
'aes256gcm' => array( 'name' => 'AES256-GCM', 'keysel' => array( 'lo' => 64, 'hi' => 128, 'step' => 32 ) ),
'blowfish' => array( 'name' => 'Blowfish', 'keysel' => array( 'lo' => 128, 'hi' => 256, 'step' => 64 ) ), 'blowfish' => array( 'name' => 'Blowfish', 'keysel' => array( 'lo' => 128, 'hi' => 256, 'step' => 64 ) ),
'3des' => array( 'name' => '3DES' ), '3des' => array( 'name' => '3DES' ),
'cast128' => array( 'name' => 'CAST128' ), 'cast128' => array( 'name' => 'CAST128' ),
'des' => array( 'name' => 'DES' ) 'des' => array( 'name' => 'DES' ),
'null' => array( 'name' => gettext("NULL (no encryption)"))
); );
$p2_halgos = array( $p2_halgos = array(
...@@ -1200,7 +1195,7 @@ EOD; ...@@ -1200,7 +1195,7 @@ EOD;
$tmpconf .= "\tesp = " . join(',', $ealgoESPsp2arr[$idx]) . "!\n"; $tmpconf .= "\tesp = " . join(',', $ealgoESPsp2arr[$idx]) . "!\n";
} }
if (!empty($ealgoAHsp2arr[$idx])) { if (!empty($ealgoAHsp2arr[$idx])) {
$connEntry .= "\tah = " . join(',', $ealgoAHsp2arr[$idx]) . "!\n"; $tmpconf .= "\tah = " . join(',', $ealgoAHsp2arr[$idx]) . "!\n";
} }
$ipsecconf .= $tmpconf; $ipsecconf .= $tmpconf;
} }
......
...@@ -536,6 +536,7 @@ $( document ).ready(function() { ...@@ -536,6 +536,7 @@ $( document ).ready(function() {
endif;?> endif;?>
<td class="hidden-xs"> <td class="hidden-xs">
<?php <?php
if (!empty($ph2ent['encryption-algorithm-option'])) {
foreach ($ph2ent['encryption-algorithm-option'] as $k => $ph2ea) { foreach ($ph2ent['encryption-algorithm-option'] as $k => $ph2ea) {
if ($k > 0) { if ($k > 0) {
echo ", "; echo ", ";
...@@ -548,6 +549,7 @@ $( document ).ready(function() { ...@@ -548,6 +549,7 @@ $( document ).ready(function() {
echo " ({$ph2ea['keylen']} " . gettext("bits") . ")"; echo " ({$ph2ea['keylen']} " . gettext("bits") . ")";
} }
} }
}
}?> }?>
</td> </td>
<td class="hidden-xs"> <td class="hidden-xs">
......
...@@ -189,7 +189,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -189,7 +189,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
} }
idinfo_to_pconfig("local", $config['ipsec']['phase2'][$p2index]['localid'], $pconfig); idinfo_to_pconfig("local", $config['ipsec']['phase2'][$p2index]['localid'], $pconfig);
idinfo_to_pconfig("remote", $config['ipsec']['phase2'][$p2index]['remoteid'], $pconfig); idinfo_to_pconfig("remote", $config['ipsec']['phase2'][$p2index]['remoteid'], $pconfig);
if (!empty($config['ipsec']['phase2'][$p2index]['encryption-algorithm-option'])) {
ealgos_to_pconfig($config['ipsec']['phase2'][$p2index]['encryption-algorithm-option'], $pconfig); ealgos_to_pconfig($config['ipsec']['phase2'][$p2index]['encryption-algorithm-option'], $pconfig);
} else {
$pconfig['ealgos'] = array();
}
if (isset($config['ipsec']['phase2'][$p2index]['mobile'])) { if (isset($config['ipsec']['phase2'][$p2index]['mobile'])) {
$pconfig['mobile'] = true; $pconfig['mobile'] = true;
} }
......
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