From 418a53cd4fbed9989bec955682477776b92222b8 Mon Sep 17 00:00:00 2001 From: nervuri Date: Fri, 4 Jun 2021 11:28:16 +0000 Subject: [PATCH] output certs to stderr on Tor verification failure --- get-certs.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/get-certs.sh b/get-certs.sh index 25280dd..81be54a 100755 --- a/get-certs.sh +++ b/get-certs.sh @@ -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,