diff options
author | jim-p <jim@pingle.org> | 2010-04-26 17:01:49 -0400 |
---|---|---|
committer | jim-p <jim@pingle.org> | 2010-04-26 17:01:49 -0400 |
commit | 9b49646252fb3b91c9bbea6182d33846c6f49988 (patch) | |
tree | 8f98a2ff6c102a1b25339664d37c4be9c203a781 | |
parent | 23a76d9410309fcfd02155d16b218bbe5ec51829 (diff) | |
download | pfsense-packages-9b49646252fb3b91c9bbea6182d33846c6f49988.tar.gz pfsense-packages-9b49646252fb3b91c9bbea6182d33846c6f49988.tar.bz2 pfsense-packages-9b49646252fb3b91c9bbea6182d33846c6f49988.zip |
Lookup user cert before trying to use it.
-rwxr-xr-x | config/openvpn-client-export/openvpn-client-export.inc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/config/openvpn-client-export/openvpn-client-export.inc b/config/openvpn-client-export/openvpn-client-export.inc index 58fea40e..6db3651f 100755 --- a/config/openvpn-client-export/openvpn-client-export.inc +++ b/config/openvpn-client-export/openvpn-client-export.inc @@ -121,6 +121,14 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $usetoke } } + // lookup user certificate info + if ($settings['mode'] != "server_user") { + $cert =& $user['cert'][$crtid]; + if (!$cert) + return false; + } else + $nokeys = true; + // determine basic variables if ($useaddr == "serveraddr") { $interface = $settings['interface']; |