aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-09-08 13:50:13 -0300
committerRenato Botelho <renato@netgate.com>2015-09-08 13:50:13 -0300
commita10decb034a9860173709071cab8cba78c8c5ca6 (patch)
treef9fafc543a709db167c51016bcb71d7f77929a26 /config
parentb3b0a9a5d9c60512bdcefa648aade9ae9f9b3b1d (diff)
parent93275f53e8333681125c9bb9d4d4f2ae7b0c7067 (diff)
downloadpfsense-packages-a10decb034a9860173709071cab8cba78c8c5ca6.tar.gz
pfsense-packages-a10decb034a9860173709071cab8cba78c8c5ca6.tar.bz2
pfsense-packages-a10decb034a9860173709071cab8cba78c8c5ca6.zip
Merge pull request #1029 from KyleJohnstonNet/master
Diffstat (limited to 'config')
-rwxr-xr-xconfig/openvpn-client-export/openvpn-client-export.inc14
-rwxr-xr-xconfig/openvpn-client-export/openvpn-client-export.xml2
2 files changed, 8 insertions, 8 deletions
diff --git a/config/openvpn-client-export/openvpn-client-export.inc b/config/openvpn-client-export/openvpn-client-export.inc
index 4dbc7302..2ecb436b 100755
--- a/config/openvpn-client-export/openvpn-client-export.inc
+++ b/config/openvpn-client-export/openvpn-client-export.inc
@@ -127,7 +127,7 @@ function openvpn_client_export_validate_config($srvid, $usrid, $crtid) {
if (!$server_cert) {
$input_errors[] = "Could not locate server certificate.";
} else {
- $server_ca = lookup_ca($server_cert['caref']);
+ $server_ca = ca_chain($server_cert);
if (!$server_ca) {
$input_errors[] = "Could not locate the CA reference for the server certificate.";
}
@@ -380,7 +380,7 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $verifys
file_put_contents("{$tempdir}/{$prefix}.ovpn", $conf);
$cafile = "{$tempdir}/{$cafile}";
- file_put_contents("{$cafile}", base64_decode($server_ca['crt']));
+ file_put_contents("{$cafile}", $server_ca);
if ($settings['tls']) {
$tlsfile = "{$tempdir}/{$prefix}-tls.key";
file_put_contents($tlsfile, base64_decode($settings['tls']));
@@ -414,7 +414,7 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $verifys
case "inlinedroid":
case "inlineios":
// Inline CA
- $conf .= "<ca>{$nl}" . trim(base64_decode($server_ca['crt'])) . "{$nl}</ca>{$nl}";
+ $conf .= "<ca>{$nl}" . trim($server_ca) . "{$nl}</ca>{$nl}";
if ($settings['mode'] != "server_user") {
// Inline Cert
$conf .= "<cert>{$nl}" . trim(base64_decode($cert['crt'])) . "{$nl}</cert>{$nl}";
@@ -442,7 +442,7 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $verifys
file_put_contents("{$tempdir}/vpn.cnf", $conf);
$cafile = "{$keydir}/ca.crt";
- file_put_contents("{$cafile}", base64_decode($server_ca['crt']));
+ file_put_contents("{$cafile}", $server_ca);
if ($settings['tls']) {
$tlsfile = "{$keydir}/ta.key";
file_put_contents($tlsfile, base64_decode($settings['tls']));
@@ -468,7 +468,7 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $verifys
file_put_contents("{$tempdir}/vpn.cnf", $conf);
$cafile = "{$tempdir}/ca.crt";
- file_put_contents("{$cafile}", base64_decode($server_ca['crt']));
+ file_put_contents("{$cafile}", $server_ca);
if ($settings['tls']) {
$tlsfile = "{$tempdir}/ta.key";
file_put_contents($tlsfile, base64_decode($settings['tls']));
@@ -561,7 +561,7 @@ function openvpn_client_export_installer($srvid, $usrid, $crtid, $useaddr, $veri
file_put_contents($cfgfile, $conf);
$cafile = "{$tempdir}/config/{$prefix}-ca.crt";
- file_put_contents($cafile, base64_decode($server_ca['crt']));
+ file_put_contents($cafile, $server_ca);
if ($settings['tls']) {
$tlsfile = "{$tempdir}/config/{$prefix}-tls.key";
file_put_contents($tlsfile, base64_decode($settings['tls']));
@@ -697,7 +697,7 @@ EOF;
// write ca
$cafile = "{$tempdir}/ca.crt";
- file_put_contents($cafile, base64_decode($server_ca['crt']));
+ file_put_contents($cafile, $server_ca);
if ($settings['mode'] != "server_user") {
diff --git a/config/openvpn-client-export/openvpn-client-export.xml b/config/openvpn-client-export/openvpn-client-export.xml
index 1a150dc5..f1d032a9 100755
--- a/config/openvpn-client-export/openvpn-client-export.xml
+++ b/config/openvpn-client-export/openvpn-client-export.xml
@@ -44,7 +44,7 @@
]]>
</copyright>
<name>OpenVPN Client Export</name>
- <version>1.2.19</version>
+ <version>1.2.20</version>
<title>OpenVPN Client Export</title>
<include_file>/usr/local/pkg/openvpn-client-export.inc</include_file>
<tabs>