Check for HTTP errors

Added back in check for HTTP error codes.
This commit is contained in:
David Cooper 2018-05-25 10:51:22 -04:00 committed by GitHub
parent feb48c0295
commit 5e7f1b75f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -1541,6 +1541,7 @@ check_revocation_ocsp() {
[[ -s "$tmpfile" ]] || response="empty ocsp response" [[ -s "$tmpfile" ]] || response="empty ocsp response"
[[ -z "$response" ]] && response="$(awk '/Responder Error:/ { print $3 }' "$tmpfile")" [[ -z "$response" ]] && response="$(awk '/Responder Error:/ { print $3 }' "$tmpfile")"
[[ -z "$response" ]] && grep -Fq "Response Verify Failure" "$tmpfile" && response="unable to verify response" [[ -z "$response" ]] && grep -Fq "Response Verify Failure" "$tmpfile" && response="unable to verify response"
[[ -z "$response" ]] && response="$(awk -F':' '/Code/ { print $NF }' $tmpfile)"
out ", " out ", "
pr_warning "error querying OCSP responder" pr_warning "error querying OCSP responder"
fileout "$jsonID" "WARN" "$response" fileout "$jsonID" "WARN" "$response"