summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/system_crlmanager.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-12-17 21:40:37 +0545
committerPhil Davis <phil.davis@inf.org>2015-12-17 21:40:37 +0545
commitf6fac5ac5d5e3b359ac9f432c68f31b6944dc7a7 (patch)
tree955d2f06ed78a77997da4eb76188a91b83f24e12 /src/usr/local/www/system_crlmanager.php
parent486cbb1dbd48def17711a569e5c23097cddd0e6d (diff)
downloadpfsense-f6fac5ac5d5e3b359ac9f432c68f31b6944dc7a7.zip
pfsense-f6fac5ac5d5e3b359ac9f432c68f31b6944dc7a7.tar.gz
system_crlmanager dodgy else statement
The "else" that was at line 550 should enclose the whole block of code below it. The "if" handles the case "No Certificates Found for this CA." and all the code below the else should only happen when there are certificates found.
Diffstat (limited to 'src/usr/local/www/system_crlmanager.php')
-rw-r--r--src/usr/local/www/system_crlmanager.php85
1 files changed, 44 insertions, 41 deletions
diff --git a/src/usr/local/www/system_crlmanager.php b/src/usr/local/www/system_crlmanager.php
index 437a3a9..e2ef21e 100644
--- a/src/usr/local/www/system_crlmanager.php
+++ b/src/usr/local/www/system_crlmanager.php
@@ -533,7 +533,9 @@ if ($act == "new" || $act == gettext("Save") || $input_errors) {
?>
</tbody>
</table>
-<?php } ?>
+<?php
+ }
+?>
</div>
</div>
<?php
@@ -545,56 +547,57 @@ if ($act == "new" || $act == gettext("Save") || $input_errors) {
}
}
- if (count($ca_certs) == 0)
+ if (count($ca_certs) == 0) {
print_info_box(gettext("No Certificates Found for this CA."), 'danger');
- else
+ } else {
+ $section = new Form_Section('Choose a certificate to revoke');
+ $group = new Form_Group(null);
- $section = new Form_Section('Choose a certificate to revoke');
- $group = new Form_Group(null);
+ $group->add(new Form_Select(
+ 'certref',
+ null,
+ $pconfig['certref'],
+ build_cacert_list()
+ ))->setWidth(4)->setHelp('Certificate');
- $group->add(new Form_Select(
- 'certref',
- null,
- $pconfig['certref'],
- build_cacert_list()
- ))->setWidth(4)->setHelp('Certificate');
+ $group->add(new Form_Select(
+ 'crlreason',
+ null,
+ -1,
+ $openssl_crl_status
+ ))->setHelp('Reason');
- $group->add(new Form_Select(
- 'crlreason',
- null,
- -1,
- $openssl_crl_status
- ))->setHelp('Reason');
+ $group->add(new Form_Button(
+ 'submit',
+ 'Add'
+ ))->removeClass('btn-primary')->addClass('btn-success btn-sm');
- $group->add(new Form_Button(
- 'submit',
- 'Add'
- ))->removeClass('btn-primary')->addClass('btn-success btn-sm');
+ $section->add($group);
- $section->add($group);
+ $section->addInput(new Form_Input(
+ 'id',
+ null,
+ 'hidden',
+ $crl['refid']
+ ));
- $section->addInput(new Form_Input(
- 'id',
- null,
- 'hidden',
- $crl['refid']
- ));
+ $section->addInput(new Form_Input(
+ 'act',
+ null,
+ 'hidden',
+ 'addcert'
+ ));
- $section->addInput(new Form_Input(
- 'act',
- null,
- 'hidden',
- 'addcert'
- ));
+ $section->addInput(new Form_Input(
+ 'crlref',
+ null,
+ 'hidden',
+ $crl['refid']
+ ));
- $section->addInput(new Form_Input(
- 'crlref',
- null,
- 'hidden',
- $crl['refid']
- ));
+ $form->add($section);
+ }
- $form->add($section);
print($form);
} else {
?>
OpenPOWER on IntegriCloud