diff options
author | jim-p <jimp@pfsense.org> | 2010-12-02 16:31:23 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2010-12-02 16:31:23 -0500 |
commit | 650cb13be26d102770c46d41dc0a540affef37a5 (patch) | |
tree | d3a7ac187b257769f3ce03ad19ae0ff61ec11e6a | |
parent | 0a0774b511c6833a2b87975c21fdb3b10897d6c9 (diff) | |
download | pfsense-650cb13be26d102770c46d41dc0a540affef37a5.zip pfsense-650cb13be26d102770c46d41dc0a540affef37a5.tar.gz |
Try to handle when cert subject entries are arrays.
-rw-r--r-- | etc/inc/certs.inc | 7 |
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; |