aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-06-30 18:10:09 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-06-30 18:10:09 -0400
commitb656d0e6874d07e4abbb206aced9806babf59a4a (patch)
treed78b27b58b55fa6cbf1fa974d9a98454d20ffd1e
parent31271542c157eeafc7df9b67dd3ab95195c173eb (diff)
downloadpfsense-packages-b656d0e6874d07e4abbb206aced9806babf59a4a.tar.gz
pfsense-packages-b656d0e6874d07e4abbb206aced9806babf59a4a.tar.bz2
pfsense-packages-b656d0e6874d07e4abbb206aced9806babf59a4a.zip
Output file as zip. Do not store files in config/
-rwxr-xr-xconfig/openvpn-client-export/openvpn-client-export.inc10
-rwxr-xr-xconfig/openvpn-client-export/vpn_openvpn_export.php2
2 files changed, 6 insertions, 6 deletions
diff --git a/config/openvpn-client-export/openvpn-client-export.inc b/config/openvpn-client-export/openvpn-client-export.inc
index 3b3b4166..b872f8ed 100755
--- a/config/openvpn-client-export/openvpn-client-export.inc
+++ b/config/openvpn-client-export/openvpn-client-export.inc
@@ -298,19 +298,19 @@ function viscosity_openvpn_client_config_exporter($srvid, $usrid, $crtid, $usead
file_put_contents($cfgfile, $conf);
// write key files
- $cafile = "{$tempdir}/config/{$prefix}-ca.crt";
+ $cafile = "{$tempdir}/{$prefix}-ca.crt";
file_put_contents($cafile, base64_decode($server_ca['crt']));
- $crtfile = "{$tempdir}/config/{$prefix}-{$user['name']}.crt";
+ $crtfile = "{$tempdir}/{$prefix}-{$user['name']}.crt";
file_put_contents($crtfile, base64_decode($cert['crt']));
- $keyfile = "{$tempdir}/config/{$prefix}-{$user['name']}.key";
+ $keyfile = "{$tempdir}/{$prefix}-{$user['name']}.key";
file_put_contents($keyfile, base64_decode($cert['prv']));
if ($settings['tls']) {
- $tlsfile = "{$tempdir}/config/{$prefix}-tls.key";
+ $tlsfile = "{$tempdir}/{$prefix}-tls.key";
file_put_contents($tlsfile, base64_decode($settings['tls']));
}
// convert to pkcs12 format
- $p12file = "{$tempdir}/config/{$prefix}.p12";
+ $p12file = "{$tempdir}/{$prefix}.p12";
if ($usetoken)
openvpn_client_pem_to_pk12($p12file, $outpass, $crtfile, $keyfile);
else
diff --git a/config/openvpn-client-export/vpn_openvpn_export.php b/config/openvpn-client-export/vpn_openvpn_export.php
index 5d9ae8ae..c26236e7 100755
--- a/config/openvpn-client-export/vpn_openvpn_export.php
+++ b/config/openvpn-client-export/vpn_openvpn_export.php
@@ -125,7 +125,7 @@ if($act == "visc") {
$password = $_GET['password']; ;
$exp_name = openvpn_client_export_prefix($srvid);
- $exp_name = urlencode($exp_name."-Viscosity.visc");
+ $exp_name = urlencode($exp_name."-Viscosity.visc.zip");
$exp_path = viscosity_openvpn_client_config_exporter($srvid, $usrid, $crtid, $useaddr, $usetoken, $password);
$exp_size = filesize($exp_path);