summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/certs.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/etc/inc/certs.inc b/etc/inc/certs.inc
index e82baba..03371fd 100644
--- a/etc/inc/certs.inc
+++ b/etc/inc/certs.inc
@@ -307,13 +307,15 @@ function cert_get_subject($str_crt, $decode = true) {
if (!is_array($components))
return "unknown";
+ ksort($components);
foreach ($components as $a => $v) {
- if (is_array($v))
+ if (is_array($v)) {
+ ksort($v);
foreach ($v as $w) {
$asubject = "{$a}={$w}";
$subject = (strlen($subject)) ? "{$asubject}, {$subject}" : $asubject;
}
- else {
+ } else {
$asubject = "{$a}={$v}";
$subject = (strlen($subject)) ? "{$asubject}, {$subject}" : $asubject;
}
@@ -561,4 +563,4 @@ function is_crl_internal($crl) {
return !(!empty($crl['text']) && empty($crl['cert']));
}
-?> \ No newline at end of file
+?>
OpenPOWER on IntegriCloud