output certs to stderr on Tor verification failure

This commit is contained in:
nervuri 2021-06-04 11:28:16 +00:00
parent ccfc936c4a
commit 418a53cd4f
Signed by: nervuri
GPG Key ID: C4769EEA7BA61672
1 changed files with 6 additions and 1 deletions

View File

@ -103,7 +103,12 @@ while read -r host; do
>&2 echo "$host_and_port - Tor connection failed"
elif [ -n "$cert" ] && [ "$cert" != "$cert_via_tor" ]; then
>&2 echo "$host_and_port - Tor VERIFICATION FAILED (certs don't match)!!!"
# In this case, don't save the certificate.
# In this case, don't save any certificate to file.
# Output both certificates to stderr instead.
>&2 echo "CERT:"
>&2 echo "$cert"
>&2 echo "CERT VIA TOR:"
>&2 echo "$cert_via_tor"
continue
else
# If direct connection failed and Tor connection succeeded,