diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-06-30 19:04:22 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-06-30 19:04:22 -0400 |
commit | 554351180f3c06782293a8577cbbd1e55652651a (patch) | |
tree | 85e01381f88d2b1a5adc873e199f7eab31caaf2c | |
parent | fcc5aa7fa9bfe3b57aa0bd7f148ba7d409b68bb1 (diff) | |
download | pfsense-packages-554351180f3c06782293a8577cbbd1e55652651a.tar.gz pfsense-packages-554351180f3c06782293a8577cbbd1e55652651a.tar.bz2 pfsense-packages-554351180f3c06782293a8577cbbd1e55652651a.zip |
Remove windows pk12 stuff for Viscosity configuraiton
-rwxr-xr-x | config/openvpn-client-export/openvpn-client-export.inc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/config/openvpn-client-export/openvpn-client-export.inc b/config/openvpn-client-export/openvpn-client-export.inc index 9a384d01..d955f520 100755 --- a/config/openvpn-client-export/openvpn-client-export.inc +++ b/config/openvpn-client-export/openvpn-client-export.inc @@ -288,36 +288,36 @@ function viscosity_openvpn_client_config_exporter($srvid, $usrid, $crtid, $usead mkdir($tempdir . "/Viscosity.visc", 0700, true); // Append new Viscosity.visc directory on top - $tempdir = $tempdir . "/Viscosity.visc"; + $tempdir = $tempdir . "/Viscosity.visc/"; // write cofiguration file $prefix = openvpn_client_export_prefix($srvid); $conf = openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $usetoken); if (!$conf) return false; - file_put_contents("{$tempdir}/config.conf", $conf); + $configfile = "{$tempdir}/config.conf"; + file_put_contents($configfile, $conf); - // write key files + // write ca $cafile = "{$tempdir}/{$prefix}-ca.crt"; file_put_contents($cafile, base64_decode($server_ca['crt'])); + + // write user .crt $crtfile = "{$tempdir}/{$prefix}-{$user['name']}.crt"; file_put_contents($crtfile, base64_decode($cert['crt'])); + + // write user .key $keyfile = "{$tempdir}/{$prefix}-{$user['name']}.key"; file_put_contents($keyfile, base64_decode($cert['prv'])); + + // TLS support? if ($settings['tls']) { $tlsfile = "{$tempdir}/{$prefix}-tls.key"; file_put_contents($tlsfile, base64_decode($settings['tls'])); } - // convert to pkcs12 format - $p12file = "{$tempdir}/{$prefix}.p12"; - if ($usetoken) - openvpn_client_pem_to_pk12($p12file, $outpass, $crtfile, $keyfile); - else - openvpn_client_pem_to_pk12($p12file, $outpass, $crtfile, $keyfile, $cafile); - // Zip Viscosity file - exec("cd {$tempdir}/.. && /usr/local/bin/zip {$zipfile} Viscosity.visc Viscosity.visc/*"); + exec("cd {$tempdir}/.. && /usr/local/bin/zip {$zipfile} Viscosity.visc Viscosity.visc/*.*"); // Remove temporary directory exec("rm -rf {$tempdir}"); |