From accb571422afe551847c82b70a707735442c9469 Mon Sep 17 00:00:00 2001 From: jim-p Date: Sat, 8 May 2010 00:46:07 -0400 Subject: Don't add tls line for viscosity, it's added already with a custom filename. --- config/openvpn-client-export/openvpn-client-export.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/openvpn-client-export/openvpn-client-export.inc b/config/openvpn-client-export/openvpn-client-export.inc index ca72798d..e6edab45 100755 --- a/config/openvpn-client-export/openvpn-client-export.inc +++ b/config/openvpn-client-export/openvpn-client-export.inc @@ -90,7 +90,7 @@ function openvpn_client_pem_to_pk12($outpath, $outpass, $crtpath, $keypath, $cap unlink($capath); } -function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $usetoken, $nokeys = false, $proxy, $zipconf = false, $outpass = "") { +function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $usetoken, $nokeys = false, $proxy, $zipconf = false, $outpass = "", $skiptls=false) { global $config, $input_errors, $g; // lookup server settings @@ -195,7 +195,7 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $usetoke } else if ($settings['mode'] == "server_user") $conf .= "ca {$cafile}\n"; - if ($settings['tls']) + if ($settings['tls'] && !$skiptls) $conf .= "tls-auth {$prefix}-tls.key 1\n"; // add optional settings @@ -414,7 +414,7 @@ function viscosity_openvpn_client_config_exporter($srvid, $usrid, $crtid, $usead file_put_contents("{$tempdir}/{$proxy['passwdfile']}", $pwdfle); } - $conf = openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $usetoken, true, $proxy); + $conf = openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $usetoken, true, $proxy, false, "", true); if (!$conf) return false; -- cgit v1.2.3