mirror of https://codeberg.org/cage/tinmop/
- [GUI] fixed deletion of TLS client certificates;
- chaged API name form 'gemini-delete-certificate' to 'gemini-delete-tofu-certificate'; - added 'misc:db-stderr'.
This commit is contained in:
parent
a16fc03337
commit
346353d21d
|
@ -48,7 +48,7 @@
|
|||
(loop for selection in selections do
|
||||
(let ((url (gui:id selection)))
|
||||
(ev:with-enqueued-process-and-unblock ()
|
||||
(comm:make-request :gemini-delete-certificate
|
||||
(comm:make-request :gemini-delete-client-certificate
|
||||
1
|
||||
url))
|
||||
(let ((new-rows (all-rows)))
|
||||
|
|
|
@ -401,7 +401,7 @@
|
|||
(when (gui:ask-yesno meta
|
||||
:title (_ "Server certificate error")
|
||||
:parent main-window)
|
||||
(cev:enqueue-request-and-wait-results :gemini-delete-certificate
|
||||
(cev:enqueue-request-and-wait-results :gemini-delete-tofu-certificate
|
||||
1
|
||||
ev:+maximum-event-priority+
|
||||
iri)
|
||||
|
@ -1071,7 +1071,7 @@ local file paths."
|
|||
(when (gui:ask-yesno (_ "The certificate for this address has changed, replace the old with the one I just received?")
|
||||
:title (_ "Server certificate error")
|
||||
:parent main-window)
|
||||
(cev:enqueue-request-and-wait-results :gemini-delete-certificate
|
||||
(cev:enqueue-request-and-wait-results :gemini-delete-tofu-certificate
|
||||
1
|
||||
ev:+maximum-event-priority+
|
||||
iri)
|
||||
|
|
|
@ -45,11 +45,11 @@
|
|||
certificate-row)))))))
|
||||
(make-instance 'gemini-certificates :contents certificates-with-hash)))
|
||||
|
||||
(defun invalidate-cached-value (cache-key)
|
||||
(db:cache-invalidate cache-key)
|
||||
(defun gemini-delete-client-certificate (url)
|
||||
(db:cache-invalidate url)
|
||||
t)
|
||||
|
||||
(defun gemini-delete-certificate (iri)
|
||||
(defun gemini-delete-tofu-certificate (iri)
|
||||
(let ((host (uri:host (iri:iri-parse iri))))
|
||||
(db:tofu-delete host)))
|
||||
|
||||
|
|
|
@ -35,6 +35,10 @@
|
|||
(db:purge-history)
|
||||
t)
|
||||
|
||||
(defun invalidate-cached-value (cache-key)
|
||||
(db:cache-invalidate cache-key)
|
||||
t)
|
||||
|
||||
(defmacro prepare-rpc (&body body)
|
||||
`(let ((rpc:*function-db* '()))
|
||||
(gen-rpc "complete-net-address"
|
||||
|
@ -74,9 +78,12 @@
|
|||
'gemini-save-url-db-history
|
||||
"iri" 0)
|
||||
(gen-rpc "gemini-certificates" 'gemini-certificates)
|
||||
(gen-rpc "gemini-delete-certificate"
|
||||
'gemini-delete-certificate
|
||||
"cache-key" 0)
|
||||
(gen-rpc "gemini-delete-tofu-certificate"
|
||||
'gemini-delete-tofu-certificate
|
||||
"host" 0)
|
||||
(gen-rpc "gemini-delete-client-certificate"
|
||||
'gemini-delete-client-certificate
|
||||
"url" 0)
|
||||
(gen-rpc "gemini-import-certificate"
|
||||
'gemini-import-certificate
|
||||
"uri" 0
|
||||
|
|
|
@ -65,12 +65,18 @@
|
|||
(apply #'dbg format-string parameters)
|
||||
(uiop:quit))
|
||||
|
||||
(defun dbg-stdout (format-string &rest parameters)
|
||||
(defun debug-stream (stream format-string &rest parameters)
|
||||
((lambda (a b)
|
||||
(apply #'format t a b))
|
||||
(apply #'format stream a b))
|
||||
(concatenate 'string format-string "~%")
|
||||
parameters))
|
||||
|
||||
(defun dbg-stdout (format-string &rest parameters)
|
||||
(apply #'debug-stream *standard-output* format-string parameters))
|
||||
|
||||
(defun dbg-stderr (format-string &rest parameters)
|
||||
(apply #'debug-stream *error-output* format-string parameters))
|
||||
|
||||
(defun dump-hash-table (table)
|
||||
(let ((res '()))
|
||||
(maphash (lambda (k v) (push (format nil "~s -> ~s~%" k v) res)) table)
|
||||
|
|
|
@ -148,6 +148,7 @@
|
|||
:dbg
|
||||
:dbg-and-quit
|
||||
:dbg-stdout
|
||||
:dbg-stderr
|
||||
:code->char
|
||||
:char->code
|
||||
:swap
|
||||
|
|
Loading…
Reference in New Issue