Skip to content

Commit 23ba9f0

Browse files
committed
Sort cert fields by name which puts extensions (including SAN entries a little bit higher)
1 parent 8d70376 commit 23ba9f0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools_ssl.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ function check_certificate_chain($hostname, $port, $sni_hostname, $debug = 0) {
113113

114114
$parsed_cert["ISSUER_NAME"] = $issuer_name;
115115

116+
ksort($parsed_cert);
116117
$captured_certs[] = $parsed_cert;
117118

118119
$subject_cn = $parsed_cert["subject"]["CN"];
@@ -156,4 +157,4 @@ function check_certificate_chain($hostname, $port, $sni_hostname, $debug = 0) {
156157
)
157158
);
158159

159-
} // end of function
160+
} // end of function

0 commit comments

Comments
 (0)