summaryrefslogtreecommitdiffstats
path: root/usr/local/www/vpn_ipsec_phase1.php
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-01-24 15:40:00 -0200
committerRenato Botelho <garga@FreeBSD.org>2013-01-24 17:32:25 -0200
commitab2ccd9f8c5c12bee3d5bcf8ceacd53b9e3f316f (patch)
tree15e3495f8b995ea1e1f8e838fafc2bf3d4d9f6e0 /usr/local/www/vpn_ipsec_phase1.php
parent1aafb7105a2241f09793e405f3b668f13445c00e (diff)
downloadpfsense-ab2ccd9f8c5c12bee3d5bcf8ceacd53b9e3f316f.zip
pfsense-ab2ccd9f8c5c12bee3d5bcf8ceacd53b9e3f316f.tar.gz
Fix indent and blanks at EOL
Diffstat (limited to 'usr/local/www/vpn_ipsec_phase1.php')
-rw-r--r--usr/local/www/vpn_ipsec_phase1.php60
1 files changed, 30 insertions, 30 deletions
diff --git a/usr/local/www/vpn_ipsec_phase1.php b/usr/local/www/vpn_ipsec_phase1.php
index 3940378..ee50cf8 100644
--- a/usr/local/www/vpn_ipsec_phase1.php
+++ b/usr/local/www/vpn_ipsec_phase1.php
@@ -93,7 +93,7 @@ if (isset($p1index) && $a_phase1[$p1index]) {
$pconfig['generate_policy'] = $a_phase1[$p1index]['generate_policy'];
$pconfig['proposal_check'] = $a_phase1[$p1index]['proposal_check'];
- if (($pconfig['authentication_method'] == "pre_shared_key") ||
+ if (($pconfig['authentication_method'] == "pre_shared_key") ||
($pconfig['authentication_method'] == "xauth_psk_server")) {
$pconfig['pskey'] = $a_phase1[$p1index]['pre-shared-key'];
} else {
@@ -112,7 +112,7 @@ if (isset($p1index) && $a_phase1[$p1index]) {
} else {
/* defaults */
$pconfig['interface'] = "wan";
- if($config['interfaces']['lan'])
+ if($config['interfaces']['lan'])
$pconfig['localnet'] = "lan";
$pconfig['mode'] = "aggressive";
$pconfig['protocol'] = "inet";
@@ -143,15 +143,15 @@ if ($_POST) {
$method = $pconfig['authentication_method'];
// Unset ca and cert if not required to avaoid storing in config
if ($method == "pre_shared_key" || $method == "xauth_psk_server"){
- unset($pconfig['caref']);
- unset($pconfig['certref']);
+ unset($pconfig['caref']);
+ unset($pconfig['certref']);
}
// Only require PSK here for normal PSK tunnels (not mobile) or xauth.
// For RSA methods, require the CA/Cert.
switch ($method) {
case "pre_shared_key":
- // If this is a mobile PSK tunnel the user PSKs go on
+ // If this is a mobile PSK tunnel the user PSKs go on
// the PSK tab, not here, so skip the check.
if ($pconfig['mobile'])
break;
@@ -176,7 +176,7 @@ if ($_POST) {
if (($pconfig['lifetime'] && !is_numeric($pconfig['lifetime'])))
$input_errors[] = gettext("The P1 lifetime must be an integer.");
- if (($pconfig['remotegw'] && !is_ipaddr($pconfig['remotegw']) && !is_domain($pconfig['remotegw'])))
+ if (($pconfig['remotegw'] && !is_ipaddr($pconfig['remotegw']) && !is_domain($pconfig['remotegw'])))
$input_errors[] = gettext("A valid remote gateway address or host name must be specified.");
if (($pconfig['remotegw'] && is_ipaddr($pconfig['remotegw']) && !isset($pconfig['disabled']) )) {
@@ -435,29 +435,29 @@ function methodsel_change() {
function ealgosel_change(bits) {
switch (document.iform.ealgo.selectedIndex) {
<?php
- $i = 0;
- foreach ($p1_ealgos as $algo => $algodata) {
- if (is_array($algodata['keysel'])) {
- echo " case {$i}:\n";
- echo " document.iform.ealgo_keylen.style.visibility = 'visible';\n";
- echo " document.iform.ealgo_keylen.options.length = 0;\n";
-// echo " document.iform.ealgo_keylen.options[document.iform.ealgo_keylen.options.length] = new Option( 'auto', 'auto' );\n";
-
- $key_hi = $algodata['keysel']['hi'];
- $key_lo = $algodata['keysel']['lo'];
- $key_step = $algodata['keysel']['step'];
-
- for ($keylen = $key_hi; $keylen >= $key_lo; $keylen -= $key_step)
- echo " document.iform.ealgo_keylen.options[document.iform.ealgo_keylen.options.length] = new Option( '{$keylen} bits', '{$keylen}' );\n";
- echo " break;\n";
- } else {
- echo " case {$i}:\n";
- echo " document.iform.ealgo_keylen.style.visibility = 'hidden';\n";
- echo " document.iform.ealgo_keylen.options.length = 0;\n";
- echo " break;\n";
- }
- $i++;
- }
+$i = 0;
+foreach ($p1_ealgos as $algo => $algodata) {
+ if (is_array($algodata['keysel'])) {
+ echo " case {$i}:\n";
+ echo " document.iform.ealgo_keylen.style.visibility = 'visible';\n";
+ echo " document.iform.ealgo_keylen.options.length = 0;\n";
+ // echo " document.iform.ealgo_keylen.options[document.iform.ealgo_keylen.options.length] = new Option( 'auto', 'auto' );\n";
+
+ $key_hi = $algodata['keysel']['hi'];
+ $key_lo = $algodata['keysel']['lo'];
+ $key_step = $algodata['keysel']['step'];
+
+ for ($keylen = $key_hi; $keylen >= $key_lo; $keylen -= $key_step)
+ echo " document.iform.ealgo_keylen.options[document.iform.ealgo_keylen.options.length] = new Option( '{$keylen} bits', '{$keylen}' );\n";
+ echo " break;\n";
+ } else {
+ echo " case {$i}:\n";
+ echo " document.iform.ealgo_keylen.style.visibility = 'hidden';\n";
+ echo " document.iform.ealgo_keylen.options.length = 0;\n";
+ echo " break;\n";
+ }
+ $i++;
+}
?>
}
@@ -537,7 +537,7 @@ function dpdchkbox_change() {
<td width="22%" valign="top" class="vncellreq"><?=gettext("Interface"); ?></td>
<td width="78%" class="vtable">
<select name="interface" class="formselect">
- <?php
+ <?php
$interfaces = get_configured_interface_with_descr();
$carplist = get_configured_carp_interface_list();
OpenPOWER on IntegriCloud