Merge pull request #2485 from drwetter/fix_CAARRquery_noDNS_30

Fix CAA query when nodns set
This commit is contained in:
Dirk Wetter 2024-05-26 17:40:10 +02:00 committed by GitHub
commit 212bdbb78e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9111,6 +9111,11 @@ certificate_info() {
jsonID="DNS_CAArecord"
caa_node="$NODE"
caa=""
if [[ -n "$NODNS" ]]; then
out "(instructed to minimize DNS queries)"
fileout "${jsonID}${json_postfix}" "INFO" "check skipped as instructed"
else
while ( [[ -z "$caa" ]] && [[ ! -z "$caa_node" ]] ); do
caa="$(get_caa_rr_record $caa_node)"
[[ $caa_node =~ '.'$ ]] || caa_node+="."
@ -9131,13 +9136,11 @@ certificate_info() {
all_caa=${all_caa%, } # strip trailing comma
pr_italic "$(out_row_aligned_max_width "$all_caa" "$indent " $TERM_WIDTH)"
fileout "${jsonID}${json_postfix}" "OK" "$all_caa"
elif [[ -n "$NODNS" ]]; then
out "(instructed to minimize DNS queries)"
fileout "${jsonID}${json_postfix}" "INFO" "check skipped as instructed"
else
pr_svrty_low "not offered"
fileout "${jsonID}${json_postfix}" "LOW" "--"
fi
fi
outln
out "$indent"; pr_bold " Certificate Transparency ";