commit cbb7b3fd6c20b696b19122837a5c73c431f73e47 parent d04c472600644620a68a4d3a7fd784f37a1f4c53 Author: Solderpunk <solderpunk@sdf.org> Date: Sun, 10 May 2020 14:19:12 +0200 Offer to reload previously used certificates for domains visited earlier. Diffstat:
M | av98.py | | | 10 | ++++++++++ |
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git a/av98.py b/av98.py @@ -271,6 +271,16 @@ class GeminiClient(cmd.Cmd): else: print("Deactivating certificate.") self._deactivate_client_cert() + # Suggest reactivating previous certs + if not self.client_certs["active"] and gi.host in self.client_certs: + print("PRIVACY ALERT: Reactivate previously used client cert for {}?".format(gi.host)) + resp = input("Y/N? ") + if resp.strip().lower() in ("y", "yes"): + self._activate_client_cert(self.client_certs[gi.host]) + else: + print("Remaining unidentified.") + self.client_certs.pop(gi.host) + # Do everything which touches the network in one block, # so we only need to catch exceptions once try: