summaryrefslogtreecommitdiffstats
path: root/etc/inc/certs.inc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/inc/certs.inc')
-rw-r--r--etc/inc/certs.inc9
1 files changed, 6 insertions, 3 deletions
diff --git a/etc/inc/certs.inc b/etc/inc/certs.inc
index e82baba..7d19045 100644
--- a/etc/inc/certs.inc
+++ b/etc/inc/certs.inc
@@ -286,6 +286,7 @@ function csr_get_subject($str_crt, $decode = true) {
if (!is_array($components))
return "unknown";
+ ksort($components);
foreach ($components as $a => $v) {
if (!strlen($subject))
$subject = "{$a}={$v}";
@@ -307,13 +308,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 +564,4 @@ function is_crl_internal($crl) {
return !(!empty($crl['text']) && empty($crl['cert']));
}
-?> \ No newline at end of file
+?>
OpenPOWER on IntegriCloud