aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-07-14 14:20:06 -0400
committerjim-p <jimp@pfsense.org>2013-07-14 14:20:06 -0400
commit5bb3bd5007f0c9b14b077e85b686aa7950d27963 (patch)
treeeb12760af5fbc7c49baa9cefc41dbdb52b0da3f0
parentbce84876eee8032f24f99ca6b72bc5d68da7511e (diff)
downloadpfsense-packages-5bb3bd5007f0c9b14b077e85b686aa7950d27963.tar.gz
pfsense-packages-5bb3bd5007f0c9b14b077e85b686aa7950d27963.tar.bz2
pfsense-packages-5bb3bd5007f0c9b14b077e85b686aa7950d27963.zip
Replace spaces in a CN with _ in filenames when exporting an OpenVPN client. Also only use a CN if there isn't a username to use instead. Unbreaks Windows Installer export with spaces in CN.
-rwxr-xr-xconfig/openvpn-client-export/openvpn-client-export.inc4
-rwxr-xr-xconfig/openvpn-client-export/openvpn-client-export.xml2
-rw-r--r--pkg_config.8.xml2
-rw-r--r--pkg_config.8.xml.amd642
4 files changed, 5 insertions, 5 deletions
diff --git a/config/openvpn-client-export/openvpn-client-export.inc b/config/openvpn-client-export/openvpn-client-export.inc
index b2c240ec..ac006d20 100755
--- a/config/openvpn-client-export/openvpn-client-export.inc
+++ b/config/openvpn-client-export/openvpn-client-export.inc
@@ -78,8 +78,8 @@ function openvpn_client_export_prefix($srvid, $usrid = null, $crtid = null) {
$filename_addition = "";
if ($usrid && is_numeric($usrid))
$filename_addition = "-".$config['system']['user'][$usrid]['name'];
- if ($crtid && is_numeric($crtid) && function_exists("cert_get_cn"))
- $filename_addition = "-".cert_get_cn($config['cert'][$crtid]['crt']);
+ elseif ($crtid && is_numeric($crtid) && function_exists("cert_get_cn"))
+ $filename_addition = "-" . str_replace(' ', '_', cert_get_cn($config['cert'][$crtid]['crt']));
return "{$host}-{$prot}-{$port}{$filename_addition}";
}
diff --git a/config/openvpn-client-export/openvpn-client-export.xml b/config/openvpn-client-export/openvpn-client-export.xml
index e70139a7..fa96b40f 100755
--- a/config/openvpn-client-export/openvpn-client-export.xml
+++ b/config/openvpn-client-export/openvpn-client-export.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<packagegui>
<name>OpenVPN Client Export</name>
- <version>1.0.6</version>
+ <version>1.0.10</version>
<title>OpenVPN Client Export</title>
<include_file>/usr/local/pkg/openvpn-client-export.inc</include_file>
<backup_file></backup_file>
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index ac814fc5..ff322b1f 100644
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -1435,7 +1435,7 @@
<depends_on_package_pbi>zip-3.0-i386.pbi p7zip-9.20.1-i386.pbi</depends_on_package_pbi>
<build_port_path>/usr/ports/archivers/p7zip</build_port_path>
<build_port_path>/usr/ports/archivers/zip</build_port_path>
- <version>1.0.9</version>
+ <version>1.0.10</version>
<status>RELEASE</status>
<required_version>2.0</required_version>
<config_file>http://www.pfsense.com/packages/config/openvpn-client-export/openvpn-client-export.xml</config_file>
diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64
index 670a25b5..f6023456 100644
--- a/pkg_config.8.xml.amd64
+++ b/pkg_config.8.xml.amd64
@@ -1422,7 +1422,7 @@
<depends_on_package_pbi>p7zip-9.20.1-amd64.pbi zip-3.0-amd64.pbi</depends_on_package_pbi>
<build_port_path>/usr/ports/archivers/p7zip</build_port_path>
<build_port_path>/usr/ports/archivers/zip</build_port_path>
- <version>1.0.9</version>
+ <version>1.0.10</version>
<status>RELEASE</status>
<required_version>2.0</required_version>
<config_file>http://www.pfsense.com/packages/config/openvpn-client-export/openvpn-client-export.xml</config_file>