diff options
author | PiBa-NL <pba_2k3@yahoo.com> | 2017-02-06 01:36:23 +0100 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-02-06 08:26:10 -0200 |
commit | d414b7eb06ef315974842dd4bcb6ce5414d3ac1c (patch) | |
tree | c076d9c056eafcfc0dd8df55215f6f3c864b5079 /src | |
parent | 85ba2f8ba350ccd6485caefe2ce389f0d74044aa (diff) | |
download | pfsense-d414b7eb06ef315974842dd4bcb6ce5414d3ac1c.zip pfsense-d414b7eb06ef315974842dd4bcb6ce5414d3ac1c.tar.gz |
certificatemanager, don't show information from previous certificate if no cert or csr is present in the cert
(cherry picked from commit 1048585a08ac824057eea35c57fe359b9e6a48fe)
Diffstat (limited to 'src')
-rw-r--r-- | src/usr/local/www/system_certmanager.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/usr/local/www/system_certmanager.php b/src/usr/local/www/system_certmanager.php index df6f056..e05fbde 100644 --- a/src/usr/local/www/system_certmanager.php +++ b/src/usr/local/www/system_certmanager.php @@ -1010,6 +1010,13 @@ foreach ($a_cert as $i => $cert): } $subj = htmlspecialchars($subj); + } else { + $subj = ""; + $issuer = ""; + $purpose = ""; + $startdate = ""; + $enddate = ""; + $caname = "<em>" . gettext("private key only") . "</em>"; } if ($cert['csr']) { @@ -1035,7 +1042,7 @@ foreach ($a_cert as $i => $cert): <td><?=$caname?></td> <td> <?=$subj?> - <?php if (!$cert['csr']): ?> + <?php if (!empty($startdate) || !empty($enddate)): ?> <br /> <small> <?=gettext("Valid From")?>: <b><?=$startdate ?></b><br /><?=gettext("Valid Until")?>: <b><?=$enddate ?></b> |