diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2016-01-25 13:20:13 -0500 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2016-01-25 13:20:13 -0500 |
commit | 4db1f21109ec4774fb8a8ceed5cc70e07af2352f (patch) | |
tree | 430e91a08fdfdd73f1af6ba0b125d931a780fa30 /src/usr/local/www | |
parent | 9a4dad76fcdd5522db4ca35100de90237f329938 (diff) | |
download | pfsense-4db1f21109ec4774fb8a8ceed5cc70e07af2352f.zip pfsense-4db1f21109ec4774fb8a8ceed5cc70e07af2352f.tar.gz |
Completed #5787
Diffstat (limited to 'src/usr/local/www')
-rw-r--r-- | src/usr/local/www/system_certmanager.php | 30 |
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> |