diff options
author | PiBa-NL <pba_2k3@yahoo.com> | 2017-04-17 20:32:38 +0200 |
---|---|---|
committer | PiBa-NL <pba_2k3@yahoo.com> | 2017-04-17 20:32:38 +0200 |
commit | 3bde5cdd705b2c8a71f6eb12833d1d95ccc133c7 (patch) | |
tree | bd537cbc7e42d3584df5321b68b09a1bf80ae845 /src/etc/inc/certs.inc | |
parent | 8a0af41adc9c29ccf7b8dabb3b7658abf46054a6 (diff) | |
download | pfsense-3bde5cdd705b2c8a71f6eb12833d1d95ccc133c7.zip pfsense-3bde5cdd705b2c8a71f6eb12833d1d95ccc133c7.tar.gz |
certificate manager, show 'in use' also for CA and CRL where certificates are in use by packages.
Diffstat (limited to 'src/etc/inc/certs.inc')
-rw-r--r-- | src/etc/inc/certs.inc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/etc/inc/certs.inc b/src/etc/inc/certs.inc index bb114c8..956520f 100644 --- a/src/etc/inc/certs.inc +++ b/src/etc/inc/certs.inc @@ -771,6 +771,27 @@ function cert_in_use($certref) { is_package_cert($certref)); } +function cert_usedby_description($refid, $certificates_used_by_packages) { + $result = ""; + 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]); + $result .= "<div title='".htmlspecialchars($hint)."'>"; + $result .= htmlspecialchars($package['pkgname'])." ($count)<br />"; + $result .= "</div>"; + } + } + } + return $result; +} + function crl_create(& $crl, $caref, $name, $serial = 0, $lifetime = 9999) { global $config; $ca =& lookup_ca($caref); |