-- Leo's gemini proxy
-- Connecting to git.thebackupbox.net:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini
repo: tlsa action: commit revision: path_from: revision_from: 20577f0c920ac924204b4e0044010fe13d86cfbd: path_to: revision_to:
commit 20577f0c920ac924204b4e0044010fe13d86cfbd Author: epoch <epoch@thebackupbox.net> Date: Wed Aug 31 12:57:44 2022 -0500 removed some error handling so that it can be handled in caller program instead diff --git a/tlsa.py b/tlsa.py
--- a/tlsa.py +++ b/tlsa.py @@ -285,17 +285,10 @@ class TLSA: if not protocol.lower() in ['tcp', 'udp', 'sctp']: raise Exception('Error: unknown protocol: %s. Should be one of tcp, udp or sctp' % protocol) - try: - if port == '*': - records = self.getRecords('*._%s.%s' % (protocol.lower(), hostname), rrtype=52, secure=secure) - else: - records = self.getRecords('_%s._%s.%s' % (port, protocol.lower(), hostname), rrtype=52, secure=secure) - except InsecureLookupException as e: - print(str(e)) - sys.exit(1) - except DNSLookupError as e: - print('Unable to resolve %s: %s' % (hostname, str(e))) - sys.exit(1) + if port == '*': + records = self.getRecords('*._%s.%s' % (protocol.lower(), hostname), rrtype=52, secure=secure) + else: + records = self.getRecords('_%s._%s.%s' % (port, protocol.lower(), hostname), rrtype=52, secure=secure) ret = [] for record in records: hexdata = b2a_hex(record) @@ -497,7 +490,7 @@ class TLSA: return pre_exit #--- epoch added this function ----# - def connect_verify(self, host, port, protocol="tcp", secure=False, debug=False, ipv4=False, ipv6=False, snihost=""): + def connect_verify(self, host, port, protocol="tcp", secure=True, debug=False, ipv4=False, ipv6=False, snihost=""): if snihost == "": snihost=host records = self.getTLSA(host, port, protocol, secure)
-----END OF PAGE-----
-- Response ended
-- Page fetched on Sun Jun 2 19:04:15 2024