diff options
author | jim-p <jim@pingle.org> | 2010-04-15 16:04:47 -0400 |
---|---|---|
committer | jim-p <jim@pingle.org> | 2010-04-15 16:04:47 -0400 |
commit | 27e21d1cf2731fb8373c9645b214ecd9bbf520df (patch) | |
tree | 2b56375a7a1440afde463e08033aecc98641727f | |
parent | 9cb9c7d427009f6e15d15da0f1a5c5b41aeb5682 (diff) | |
download | pfsense-27e21d1cf2731fb8373c9645b214ecd9bbf520df.zip pfsense-27e21d1cf2731fb8373c9645b214ecd9bbf520df.tar.gz |
Fix CA cert dupe detection when no certs yet exist.
-rw-r--r-- | usr/local/www/wizards/openvpn_wizard.inc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr/local/www/wizards/openvpn_wizard.inc b/usr/local/www/wizards/openvpn_wizard.inc index a452152..6fe2a41 100644 --- a/usr/local/www/wizards/openvpn_wizard.inc +++ b/usr/local/www/wizards/openvpn_wizard.inc @@ -172,10 +172,12 @@ function step7_submitphpaction() { $canames = array(); $cacns = array(); - foreach($config['system']['ca'] as $ca) { - $canames[] = $ca['name']; - $cainfo = cert_get_subject_hash($ca['crt']); - $cacns[] = $cainfo["CN"]; + if (is_array($config['system']['ca'])) { + foreach($config['system']['ca'] as $ca) { + $canames[] = $ca['name']; + $cainfo = cert_get_subject_hash($ca['crt']); + $cacns[] = $cainfo["CN"]; + } } if (empty($_POST['name']) || empty($_POST['keylength']) || empty($_POST['lifetime']) || |