Skip to content

Commit

Permalink
Sort cert fields by name which puts extensions (including SAN entries…
Browse files Browse the repository at this point in the history
… a little bit higher)
  • Loading branch information
vvuksan committed Apr 11, 2016
1 parent 8d70376 commit 23ba9f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools_ssl.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ function check_certificate_chain($hostname, $port, $sni_hostname, $debug = 0) {

$parsed_cert["ISSUER_NAME"] = $issuer_name;

ksort($parsed_cert);
$captured_certs[] = $parsed_cert;

$subject_cn = $parsed_cert["subject"]["CN"];
Expand Down Expand Up @@ -156,4 +157,4 @@ function check_certificate_chain($hostname, $port, $sni_hostname, $debug = 0) {
)
);

} // end of function
} // end of function

0 comments on commit 23ba9f0

Please sign in to comment.