aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-10-31 13:20:10 -0400
committerjim-p <jimp@pfsense.org>2013-10-31 13:20:10 -0400
commitdea4128ef42f3346dca4b1e942c3e081cb30178a (patch)
treee37c5010df03a01f4e0d1f4282c72434a544c562 /config
parent834eab120df21458205690c84ca4cec2f8b46a8b (diff)
downloadpfsense-packages-dea4128ef42f3346dca4b1e942c3e081cb30178a.tar.gz
pfsense-packages-dea4128ef42f3346dca4b1e942c3e081cb30178a.tar.bz2
pfsense-packages-dea4128ef42f3346dca4b1e942c3e081cb30178a.zip
Add auth line to client config if configured on the server (drop-down is there to set it in master/2.2)
Diffstat (limited to 'config')
-rwxr-xr-xconfig/openvpn-client-export/openvpn-client-export.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/config/openvpn-client-export/openvpn-client-export.inc b/config/openvpn-client-export/openvpn-client-export.inc
index 75166971..2231516b 100755
--- a/config/openvpn-client-export/openvpn-client-export.inc
+++ b/config/openvpn-client-export/openvpn-client-export.inc
@@ -187,6 +187,7 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $quotese
$remotes = openvpn_client_export_build_remote_lines($settings, $useaddr, $interface, $expformat, $nl);
$server_port = $settings['local_port'];
$cipher = $settings['crypto'];
+ $digest = !empty($settings['digest']) ? $settings['digest'] : "SHA1";
// add basic settings
$devmode = empty($settings['dev_mode']) ? "tun" : $settings['dev_mode'];
@@ -201,6 +202,7 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $quotese
// if ((($expformat != "inlinedroid") && ($expformat != "inlineios")) && ($proto == "tcp"))
// $conf .= "proto tcp-client{$nl}";
$conf .= "cipher {$cipher}{$nl}";
+ $conf .= "auth {$digest}{$nl}";
$conf .= "tls-client{$nl}";
$conf .= "client{$nl}";
if (($expformat != "inlinedroid") && ($expformat != "inlineios"))
@@ -717,6 +719,7 @@ function openvpn_client_export_sharedkey_config($srvid, $useaddr, $proxy, $zipco
$proto = (strtoupper($settings['protocol']) == 'UDP' ? 'udp' : "tcp-client");
$cipher = $settings['crypto'];
+ $digest = !empty($settings['digest']) ? $settings['digest'] : "SHA1";
// add basic settings
$conf = "dev tun\n";
@@ -727,6 +730,7 @@ function openvpn_client_export_sharedkey_config($srvid, $useaddr, $proxy, $zipco
$conf .= "persist-key\n";
$conf .= "proto {$proto}\n";
$conf .= "cipher {$cipher}\n";
+ $conf .= "auth {$digest}\n";
$conf .= "pull\n";
$conf .= "resolv-retry infinite\n";
$conf .= "remote {$server_host} {$server_port}\n";