diff options
author | jim-p <jim@pingle.org> | 2010-09-04 15:26:55 -0400 |
---|---|---|
committer | jim-p <jim@pingle.org> | 2010-09-04 15:26:55 -0400 |
commit | 6837018078c4df27b44522532b0644a48ec1ceb7 (patch) | |
tree | b384ff1234eccdd5b304ffd4325dddf5084dd673 /config/openvpn-client-export/openvpn-client-export.inc | |
parent | 0f44a289caec586d72fd07ea2abc6d2d3a514e69 (diff) | |
download | pfsense-packages-6837018078c4df27b44522532b0644a48ec1ceb7.tar.gz pfsense-packages-6837018078c4df27b44522532b0644a48ec1ceb7.tar.bz2 pfsense-packages-6837018078c4df27b44522532b0644a48ec1ceb7.zip |
Update OpenVPN client export package to work with the new user cert setup (and retain compatibility with the old setup too)
Diffstat (limited to 'config/openvpn-client-export/openvpn-client-export.inc')
-rwxr-xr-x | config/openvpn-client-export/openvpn-client-export.inc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/config/openvpn-client-export/openvpn-client-export.inc b/config/openvpn-client-export/openvpn-client-export.inc index 8d7d338b..7cffaf3e 100755 --- a/config/openvpn-client-export/openvpn-client-export.inc +++ b/config/openvpn-client-export/openvpn-client-export.inc @@ -126,6 +126,9 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $usetoke $cert =& $user['cert'][$crtid]; if (!$cert) return false; + // If $cert is not an array, it's a certref not a cert. + if (!is_array($cert)) + $cert = lookup_cert($cert); } else $nokeys = true; @@ -288,6 +291,9 @@ function openvpn_client_export_installer($srvid, $usrid, $crtid, $useaddr, $uset $cert =& $user['cert'][$crtid]; if (!$cert) return false; + // If $cert is not an array, it's a certref not a cert. + if (!is_array($cert)) + $cert = lookup_cert($cert); } else $nokeys = true; @@ -401,6 +407,9 @@ function viscosity_openvpn_client_config_exporter($srvid, $usrid, $crtid, $usead $cert =& $user['cert'][$crtid]; if (!$cert) return false; + // If $cert is not an array, it's a certref not a cert. + if (!is_array($cert)) + $cert = lookup_cert($cert); } // create template directory |