summaryrefslogtreecommitdiffstats
path: root/etc/inc/certs.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-12-02 16:31:23 -0500
committerjim-p <jimp@pfsense.org>2010-12-02 16:31:23 -0500
commit650cb13be26d102770c46d41dc0a540affef37a5 (patch)
treed3a7ac187b257769f3ce03ad19ae0ff61ec11e6a /etc/inc/certs.inc
parent0a0774b511c6833a2b87975c21fdb3b10897d6c9 (diff)
downloadpfsense-650cb13be26d102770c46d41dc0a540affef37a5.zip
pfsense-650cb13be26d102770c46d41dc0a540affef37a5.tar.gz
Try to handle when cert subject entries are arrays.
Diffstat (limited to 'etc/inc/certs.inc')
-rw-r--r--etc/inc/certs.inc7
1 files changed, 4 insertions, 3 deletions
diff --git a/etc/inc/certs.inc b/etc/inc/certs.inc
index 33aac66..5e01a50 100644
--- a/etc/inc/certs.inc
+++ b/etc/inc/certs.inc
@@ -308,10 +308,11 @@ function cert_get_subject($str_crt, $decode = true) {
return "unknown";
foreach ($components as $a => $v) {
- if (!strlen($subject))
- $subject = "{$a}={$v}";
+ if (is_array($v))
+ foreach ($v as $w)
+ $subject = "{$a}={$w}" . (strlen($subject)) ? ", {$subject}" : "" ;
else
- $subject = "{$a}={$v}, {$subject}";
+ $subject = "{$a}={$v}" . (strlen($subject)) ? ", {$subject}" : "" ;
}
return $subject;
OpenPOWER on IntegriCloud