Restore cert prompt functionality.

This commit is contained in:
Solderpunk 2023-11-18 19:27:42 +01:00
parent 0393ae3ea3
commit 62972c0228
2 changed files with 7 additions and 0 deletions

View File

@ -518,6 +518,10 @@ you'll be able to transparently follow links to Gopherspace!""")
context = self._prepare_SSL_context(self.options["tls_mode"])
if not self.client_cert_manager.associate_client_cert(context, gi):
raise UserAbortException()
if self.client_cert_manager.is_cert_active():
self.prompt = self.cert_prompt
else:
self.prompt = self.no_cert_prompt
# Connect to remote host by any address possible
err = None

View File

@ -88,6 +88,9 @@ class ClientCertificateManager:
return True
def is_cert_active(self):
return self.client_certs["active"] != None
def handle_cert_request(self, meta, status, host):
# Don't do client cert stuff in restricted mode, as in principle