summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-12-03 09:15:35 -0500
committerjim-p <jimp@pfsense.org>2010-12-03 09:15:35 -0500
commit5479df470b7e2c66693871cc53ce3ae356fcbd65 (patch)
tree484ec399aec1f2bc8a66409516bc5fecc7479913
parent864bf77420afb47d55bf8b84b789020182095d44 (diff)
downloadpfsense-5479df470b7e2c66693871cc53ce3ae356fcbd65.zip
pfsense-5479df470b7e2c66693871cc53ce3ae356fcbd65.tar.gz
Fix this code a bit, my first attempt yesterday didn't work properly (this should).
-rw-r--r--etc/inc/certs.inc12
1 files changed, 8 insertions, 4 deletions
diff --git a/etc/inc/certs.inc b/etc/inc/certs.inc
index 5e01a50..e82baba 100644
--- a/etc/inc/certs.inc
+++ b/etc/inc/certs.inc
@@ -309,10 +309,14 @@ function cert_get_subject($str_crt, $decode = true) {
foreach ($components as $a => $v) {
if (is_array($v))
- foreach ($v as $w)
- $subject = "{$a}={$w}" . (strlen($subject)) ? ", {$subject}" : "" ;
- else
- $subject = "{$a}={$v}" . (strlen($subject)) ? ", {$subject}" : "" ;
+ foreach ($v as $w) {
+ $asubject = "{$a}={$w}";
+ $subject = (strlen($subject)) ? "{$asubject}, {$subject}" : $asubject;
+ }
+ else {
+ $asubject = "{$a}={$v}";
+ $subject = (strlen($subject)) ? "{$asubject}, {$subject}" : $asubject;
+ }
}
return $subject;
OpenPOWER on IntegriCloud