aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-06-30 22:46:32 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-06-30 22:46:32 -0400
commitc6803458f1eacd83534f49424d7dcd7529d157c0 (patch)
tree102a13c933ae0df959cdb0173b797dc772e28656 /config
parent363e64f83c5ad359bf08c0edba4598431114d58d (diff)
downloadpfsense-packages-c6803458f1eacd83534f49424d7dcd7529d157c0.tar.gz
pfsense-packages-c6803458f1eacd83534f49424d7dcd7529d157c0.tar.bz2
pfsense-packages-c6803458f1eacd83534f49424d7dcd7529d157c0.zip
Oops, export certs with correct filenames
Diffstat (limited to 'config')
-rwxr-xr-xconfig/openvpn-client-export/openvpn-client-export.inc16
1 files changed, 12 insertions, 4 deletions
diff --git a/config/openvpn-client-export/openvpn-client-export.inc b/config/openvpn-client-export/openvpn-client-export.inc
index 184c39cd..08f8390b 100755
--- a/config/openvpn-client-export/openvpn-client-export.inc
+++ b/config/openvpn-client-export/openvpn-client-export.inc
@@ -309,23 +309,31 @@ function viscosity_openvpn_client_config_exporter($srvid, $usrid, $crtid, $usead
EOF;
$configfile = "{$tempdir}/config.conf";
+ $conf .= <<<EOF
+cert cert.crt
+tls-auth ta.key
+ca ca.crt
+key key.key
+EOF;
file_put_contents($configfile, $visc_settings . "\n" . $conf);
+ // ca.crt cert.crt config.conf key.key ta.key
+
// write ca
- $cafile = "{$tempdir}/{$prefix}-ca.crt";
+ $cafile = "{$tempdir}/ca.crt";
file_put_contents($cafile, base64_decode($server_ca['crt']));
// write user .crt
- $crtfile = "{$tempdir}/{$prefix}-{$user['name']}.crt";
+ $crtfile = "{$tempdir}/cert.crt";
file_put_contents($crtfile, base64_decode($cert['crt']));
// write user .key
- $keyfile = "{$tempdir}/{$prefix}-{$user['name']}.key";
+ $keyfile = "{$tempdir}/key.key";
file_put_contents($keyfile, base64_decode($cert['prv']));
// TLS support?
if ($settings['tls']) {
- $tlsfile = "{$tempdir}/{$prefix}-tls.key";
+ $tlsfile = "{$tempdir}/ta.key";
file_put_contents($tlsfile, base64_decode($settings['tls']));
}