aboutsummaryrefslogtreecommitdiffstats
path: root/config/openvpn-client-export/openvpn-client-export.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-07-01 10:11:55 -0400
committerjim-p <jimp@pfsense.org>2010-07-01 10:11:55 -0400
commit060f98a49550838d35407006a8e57b71fab66eee (patch)
treed637b7ecb7391ec04e820f627fa9afe45364509f /config/openvpn-client-export/openvpn-client-export.inc
parentf6cc1aad279ba95d70eb3c6a564eb50152cbeb63 (diff)
downloadpfsense-packages-060f98a49550838d35407006a8e57b71fab66eee.tar.gz
pfsense-packages-060f98a49550838d35407006a8e57b71fab66eee.tar.bz2
pfsense-packages-060f98a49550838d35407006a8e57b71fab66eee.zip
Ensure that we do not get two CA lines in the Viscosity config
Diffstat (limited to 'config/openvpn-client-export/openvpn-client-export.inc')
-rwxr-xr-xconfig/openvpn-client-export/openvpn-client-export.inc8
1 files changed, 8 insertions, 0 deletions
diff --git a/config/openvpn-client-export/openvpn-client-export.inc b/config/openvpn-client-export/openvpn-client-export.inc
index c453b8e2..8d7d338b 100755
--- a/config/openvpn-client-export/openvpn-client-export.inc
+++ b/config/openvpn-client-export/openvpn-client-export.inc
@@ -423,6 +423,14 @@ function viscosity_openvpn_client_config_exporter($srvid, $usrid, $crtid, $usead
if (!$conf)
return false;
+ // We need to nuke the ca line from the above config if it exists.
+ $conf = explode("\n", $conf);
+ for ($i=0; $i < count($conf); $i++) {
+ if (substr($conf[$i], 0, 3) == "ca ")
+ unset($conf[$i]);
+ }
+ $conf = implode("\n", $conf);
+
$friendly_name = $settings['description'];
$visc_settings = <<<EOF
#-- Config Auto Generated By pfSense for Viscosity --#