1
0
Fork 0

- [GUI] fixed deletion of old certificates when a mismatch with the cached ones occurred.

This commit is contained in:
cage 2023-05-18 19:08:34 +02:00
parent ad06c1b231
commit 329d2d32d1
2 changed files with 4 additions and 3 deletions

View File

@ -863,7 +863,7 @@
(let ((actual-iri (get-user-request-query iri meta main-window :sensitive t)))
(start-stream-iri actual-iri main-window nil)))
((= status-code comm:+tofu-error-status-code+)
(when (gui:ask-yesno meta
(when (gui:ask-yesno (_ "The certificate for this address has changed, replace the old with the one jut got?")
:title (_ "Server certificate error")
:parent main-window)
(cev:enqueue-request-and-wait-results :gemini-delete-certificate

View File

@ -46,8 +46,9 @@
(db:cache-invalidate cache-key)
t)
(defun gemini-delete-certificate (cache-key)
(invalidate-cached-value cache-key))
(defun gemini-delete-certificate (iri)
(let ((host (uri:host (iri:iri-parse iri))))
(db:tofu-delete host)))
(defun gemini-import-certificate (uri cert-file key-file)
(db-utils:with-ready-database (:connect nil)