summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/system_certmanager.php
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2016-01-25 13:20:13 -0500
committerStephen Beaver <sbeaver@netgate.com>2016-01-25 13:20:13 -0500
commit4db1f21109ec4774fb8a8ceed5cc70e07af2352f (patch)
tree430e91a08fdfdd73f1af6ba0b125d931a780fa30 /src/usr/local/www/system_certmanager.php
parent9a4dad76fcdd5522db4ca35100de90237f329938 (diff)
downloadpfsense-4db1f21109ec4774fb8a8ceed5cc70e07af2352f.zip
pfsense-4db1f21109ec4774fb8a8ceed5cc70e07af2352f.tar.gz
Completed #5787
Diffstat (limited to 'src/usr/local/www/system_certmanager.php')
-rw-r--r--src/usr/local/www/system_certmanager.php30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/usr/local/www/system_certmanager.php b/src/usr/local/www/system_certmanager.php
index 5a996cd..7cd98ee 100644
--- a/src/usr/local/www/system_certmanager.php
+++ b/src/usr/local/www/system_certmanager.php
@@ -1005,11 +1005,18 @@ print $form;
<th><?=gettext("Issuer")?></th>
<th><?=gettext("Distinguished Name")?></th>
<th><?=gettext("In Use")?></th>
+
<th class="col-sm-2"><?=gettext("Actions")?></th>
</tr>
</thead>
<tbody>
<?php
+
+$pluginparams = array();
+$pluginparams['type'] = 'certificates';
+$pluginparams['event'] = 'used_certificates';
+$certificates_used_by_packages = pkg_call_plugins('plugin_certificates', $pluginparams);
+$i = 0;
foreach ($a_cert as $i => $cert):
$name = htmlspecialchars($cert['descr']);
@@ -1080,6 +1087,25 @@ foreach ($a_cert as $i => $cert):
<?php if (is_captiveportal_cert($cert['refid'])): ?>
Captive Portal
<?php endif?>
+<?php
+ $refid = $cert['refid'];
+ if (is_array($certificates_used_by_packages)) {
+ foreach ($certificates_used_by_packages as $name => $package) {
+ if (isset($package['certificatelist'][$refid])) {
+ $hint = "" ;
+ if (is_array($package['certificatelist'][$refid])) {
+ foreach ($package['certificatelist'][$refid] as $cert_used) {
+ $hint = $hint . $cert_used['usedby']."\n";
+ }
+ }
+ $count = count($package['certificatelist'][$refid]);
+ echo "<div title='".htmlspecialchars($hint)."'>";
+ echo htmlspecialchars($package['pkgname'])." ($count)<br />";
+ echo "</div>";
+ }
+ }
+ }
+?>
</td>
<td>
<?php if (!$cert['csr']): ?>
@@ -1096,7 +1122,9 @@ foreach ($a_cert as $i => $cert):
<?php endif?>
</td>
</tr>
-<?php endforeach; ?>
+<?php
+ $i++;
+ endforeach; ?>
</tbody>
</table>
</div>
OpenPOWER on IntegriCloud