diff --git a/av98.py b/av98.py index f74b532..8e79d71 100755 --- a/av98.py +++ b/av98.py @@ -484,7 +484,7 @@ you'll be able to transparently follow links to Gopherspace!""") # Client cert elif status.startswith("6"): - self._handle_cert_request(meta) + self._handle_cert_request(meta, status, gi.host) return self._fetch_over_network(gi) # Invalid status @@ -700,7 +700,7 @@ you'll be able to transparently follow links to Gopherspace!""") for _, filename in self.cache.values(): assert os.path.isfile(filename) - def _handle_cert_request(self, meta): + def _handle_cert_request(self, meta, status, host): # Don't do client cert stuff in restricted mode, as in principle # it could be used to fill up the disk by creating a whole lot of @@ -719,7 +719,7 @@ you'll be able to transparently follow links to Gopherspace!""") print("The server did not accept your certificate.") print("You may need to e.g. coordinate with the admin to get your certificate fingerprint whitelisted.") else: - print("The site {} is requesting a client certificate.".format(gi.host)) + print("The site {} is requesting a client certificate.".format(host)) print("This will allow the site to recognise you across requests.") # Give the user choices @@ -727,8 +727,8 @@ you'll be able to transparently follow links to Gopherspace!""") print("1. Give up.") print("2. Generate a new transient certificate.") print("3. Generate a new persistent certificate.") - print("4. Load a previously generated persistent.") - print("5. Load certificate from an external file.") + print("4. Load a previously generated certificate.") + print("5. Load a certificate from an external file.") choice = input("> ").strip() if choice == "2": self._generate_transient_cert_cert()