1
0
Fork 0

- [RPC] fixed encoding of certificates.

This commit is contained in:
cage 2023-01-13 16:09:14 +01:00
parent 48f950af1e
commit b0140d6fc6
1 changed files with 4 additions and 3 deletions

View File

@ -322,13 +322,14 @@
(defstruct (gemini-certificates (:include box)))
(defmethod yason:encode ((object gemini-certificates) &optional (stream *standard-output*))
(let ((json:*symbol-encoder* #'json:encode-symbol-as-lowercase)
(yason:*list-encoder* #'yason:encode-plist)
(json:*symbol-key-encoder* #'json:encode-symbol-as-lowercase))
(yason:with-output (stream)
(yason:encode (gemini-certificates-payload object)))))
(yason:with-output (stream)
(yason:with-array ()
(loop for certificate in (gemini-certificates-payload object) do
(yason:encode-array-element certificate))))))
(defun gemini-certificates ()
(make-gemini-certificates :payload (db:find-tls-certificates-rows)))