mirror of
https://codeberg.org/cage/tinmop/
synced 2025-02-25 09:17:45 +01:00
- [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
|
(loop for selection in selections do
|
||||||
(let ((url (gui:id selection)))
|
(let ((url (gui:id selection)))
|
||||||
(ev:with-enqueued-process-and-unblock ()
|
(ev:with-enqueued-process-and-unblock ()
|
||||||
(comm:make-request :gemini-delete-certificate
|
(comm:make-request :gemini-delete-client-certificate
|
||||||
1
|
1
|
||||||
url))
|
url))
|
||||||
(let ((new-rows (all-rows)))
|
(let ((new-rows (all-rows)))
|
||||||
|
@ -401,7 +401,7 @@
|
|||||||
(when (gui:ask-yesno meta
|
(when (gui:ask-yesno meta
|
||||||
:title (_ "Server certificate error")
|
:title (_ "Server certificate error")
|
||||||
:parent main-window)
|
:parent main-window)
|
||||||
(cev:enqueue-request-and-wait-results :gemini-delete-certificate
|
(cev:enqueue-request-and-wait-results :gemini-delete-tofu-certificate
|
||||||
1
|
1
|
||||||
ev:+maximum-event-priority+
|
ev:+maximum-event-priority+
|
||||||
iri)
|
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?")
|
(when (gui:ask-yesno (_ "The certificate for this address has changed, replace the old with the one I just received?")
|
||||||
:title (_ "Server certificate error")
|
:title (_ "Server certificate error")
|
||||||
:parent main-window)
|
:parent main-window)
|
||||||
(cev:enqueue-request-and-wait-results :gemini-delete-certificate
|
(cev:enqueue-request-and-wait-results :gemini-delete-tofu-certificate
|
||||||
1
|
1
|
||||||
ev:+maximum-event-priority+
|
ev:+maximum-event-priority+
|
||||||
iri)
|
iri)
|
||||||
|
@ -45,11 +45,11 @@
|
|||||||
certificate-row)))))))
|
certificate-row)))))))
|
||||||
(make-instance 'gemini-certificates :contents certificates-with-hash)))
|
(make-instance 'gemini-certificates :contents certificates-with-hash)))
|
||||||
|
|
||||||
(defun invalidate-cached-value (cache-key)
|
(defun gemini-delete-client-certificate (url)
|
||||||
(db:cache-invalidate cache-key)
|
(db:cache-invalidate url)
|
||||||
t)
|
t)
|
||||||
|
|
||||||
(defun gemini-delete-certificate (iri)
|
(defun gemini-delete-tofu-certificate (iri)
|
||||||
(let ((host (uri:host (iri:iri-parse iri))))
|
(let ((host (uri:host (iri:iri-parse iri))))
|
||||||
(db:tofu-delete host)))
|
(db:tofu-delete host)))
|
||||||
|
|
||||||
|
@ -35,6 +35,10 @@
|
|||||||
(db:purge-history)
|
(db:purge-history)
|
||||||
t)
|
t)
|
||||||
|
|
||||||
|
(defun invalidate-cached-value (cache-key)
|
||||||
|
(db:cache-invalidate cache-key)
|
||||||
|
t)
|
||||||
|
|
||||||
(defmacro prepare-rpc (&body body)
|
(defmacro prepare-rpc (&body body)
|
||||||
`(let ((rpc:*function-db* '()))
|
`(let ((rpc:*function-db* '()))
|
||||||
(gen-rpc "complete-net-address"
|
(gen-rpc "complete-net-address"
|
||||||
@ -74,9 +78,12 @@
|
|||||||
'gemini-save-url-db-history
|
'gemini-save-url-db-history
|
||||||
"iri" 0)
|
"iri" 0)
|
||||||
(gen-rpc "gemini-certificates" 'gemini-certificates)
|
(gen-rpc "gemini-certificates" 'gemini-certificates)
|
||||||
(gen-rpc "gemini-delete-certificate"
|
(gen-rpc "gemini-delete-tofu-certificate"
|
||||||
'gemini-delete-certificate
|
'gemini-delete-tofu-certificate
|
||||||
"cache-key" 0)
|
"host" 0)
|
||||||
|
(gen-rpc "gemini-delete-client-certificate"
|
||||||
|
'gemini-delete-client-certificate
|
||||||
|
"url" 0)
|
||||||
(gen-rpc "gemini-import-certificate"
|
(gen-rpc "gemini-import-certificate"
|
||||||
'gemini-import-certificate
|
'gemini-import-certificate
|
||||||
"uri" 0
|
"uri" 0
|
||||||
|
@ -65,12 +65,18 @@
|
|||||||
(apply #'dbg format-string parameters)
|
(apply #'dbg format-string parameters)
|
||||||
(uiop:quit))
|
(uiop:quit))
|
||||||
|
|
||||||
(defun dbg-stdout (format-string &rest parameters)
|
(defun debug-stream (stream format-string &rest parameters)
|
||||||
((lambda (a b)
|
((lambda (a b)
|
||||||
(apply #'format t a b))
|
(apply #'format stream a b))
|
||||||
(concatenate 'string format-string "~%")
|
(concatenate 'string format-string "~%")
|
||||||
parameters))
|
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)
|
(defun dump-hash-table (table)
|
||||||
(let ((res '()))
|
(let ((res '()))
|
||||||
(maphash (lambda (k v) (push (format nil "~s -> ~s~%" k v) res)) table)
|
(maphash (lambda (k v) (push (format nil "~s -> ~s~%" k v) res)) table)
|
||||||
|
@ -148,6 +148,7 @@
|
|||||||
:dbg
|
:dbg
|
||||||
:dbg-and-quit
|
:dbg-and-quit
|
||||||
:dbg-stdout
|
:dbg-stdout
|
||||||
|
:dbg-stderr
|
||||||
:code->char
|
:code->char
|
||||||
:char->code
|
:char->code
|
||||||
:swap
|
:swap
|
||||||
|
Loading…
x
Reference in New Issue
Block a user