From cbb7b3fd6c20b696b19122837a5c73c431f73e47 Mon Sep 17 00:00:00 2001 From: Solderpunk Date: Sun, 10 May 2020 14:19:12 +0200 Subject: [PATCH] Offer to reload previously used certificates for domains visited earlier. --- av98.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/av98.py b/av98.py index f86b89f..f17cd01 100755 --- 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: