diff options
author | Remy <relst@relst.nl> | 2015-03-27 21:50:44 +0100 |
---|---|---|
committer | Remy <relst@relst.nl> | 2015-03-27 21:50:44 +0100 |
commit | 364bd59b70f31939ed3de703d92fe8ae3c087f29 (patch) | |
tree | d7288cff3e02e593a7fa8f6d3b30d79533525111 | |
parent | b0e223037fca7e216a7b3ca9679d176bc6a8d6a5 (diff) | |
download | ssl-decoder-364bd59b70f31939ed3de703d92fe8ae3c087f29.zip ssl-decoder-364bd59b70f31939ed3de703d92fe8ae3c087f29.tar.gz ssl-decoder-364bd59b70f31939ed3de703d92fe8ae3c087f29.tar.bz2 |
Fix OCSP status display
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | functions/parse_certificate.php | 18 |
2 files changed, 9 insertions, 10 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index f5b7249..d75a867 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Fix issue with OCSP validation and HTTP 1.1 (StartCOM) - Fix CRL validation issue for self signed CRL URI's - Fix http header case sensitive validation (HSTS, HPKP) +- Fix OCSP status display - Relicense under Affero GPL ## 1.8 diff --git a/functions/parse_certificate.php b/functions/parse_certificate.php index 17c1229..a5727df 100644 --- a/functions/parse_certificate.php +++ b/functions/parse_certificate.php @@ -425,23 +425,21 @@ function get_cert_cn($raw_cert_data){ $ocsp_uri = explode(" ", $ocsp_uri)[0]; if ( isset($raw_next_cert_data) && !empty($ocsp_uri) ) { - - $ocsp_result = ocsp_verify($raw_cert_data, $raw_next_cert_data); if ($ocsp_result["ocsp_verify_status"] == "good") { echo '<span class="text-success glyphicon glyphicon-ok-sign"></span> '; - echo '<span class="text-success">'; + echo '<span class="text-success"> - OK: '; echo htmlspecialchars($ocsp_uri); - echo "<br>This update: " . htmlspecialchars($ocsp_result["This Update"]) . " - "; - echo "<br>Next update: " . htmlspecialchars($ocsp_result["Next Update"]) . "</span>"; + echo "</span><br><pre>This update: " . htmlspecialchars($ocsp_result["This Update"]) . " - "; + echo "<br>Next update: " . htmlspecialchars($ocsp_result["Next Update"]) . "</pre>"; } else if ( $ocsp_result["ocsp_verify_status"] == "revoked") { - echo '<span class="text-danger glyphicon glyphicon-remove-sign"></span> - '; - echo '<span class="text-danger">'; + echo '<span class="text-danger glyphicon glyphicon-remove-sign"></span>'; + echo '<span class="text-danger"> - REVOKED: '; echo htmlspecialchars($ocsp_uri); - echo "<br>This update: " . htmlspecialchars($ocsp_result["This Update"]); - echo "<br>Next update: " . htmlspecialchars($ocsp_result["Next Update"]) . "</span>"; + echo "</span><br><pre>This update: " . htmlspecialchars($ocsp_result["This Update"]); + echo "<br>Next update: " . htmlspecialchars($ocsp_result["Next Update"]) . "</pre>"; } else { echo '<span class="text-danger glyphicon glyphicon-question-sign"></span>'; - echo '<span class="text-danger">'; + echo '<span class="text-danger"> - UNKNOWN: '; echo " - " . htmlspecialchars($ocsp_uri) . "</span><br>"; echo "<pre>" . htmlspecialchars($ocsp_result["unknown"]) . "</pre>"; |