mirror of https://codeberg.org/cage/tinmop/
- [gemini] fixed test for checking valid cached value for
certificate/key pair. The function to find a cached certificate/key or create a new pair retuns a multiple value. I was using multiple-value-list for getting the pairs certificate/key from said functions. Then i was checking the results of 'multiple-value-list' for null values to get the non correct pair, but that expression never return nil (was returning '(nil) instead). This was breaking the client autentication.
This commit is contained in:
parent
8e58698bfa
commit
848ed6a043
|
@ -474,16 +474,21 @@
|
||||||
:streaming
|
:streaming
|
||||||
:running)))
|
:running)))
|
||||||
(fetch-cached-certificate (actual-iri)
|
(fetch-cached-certificate (actual-iri)
|
||||||
(let* ((certificate-and-key
|
(let ((certificate nil)
|
||||||
(or (multiple-value-list
|
(key nil))
|
||||||
(db:ssl-cert-find actual-iri))
|
(multiple-value-bind (certificate-cache key-cache)
|
||||||
(multiple-value-list
|
(db:ssl-cert-find actual-iri)
|
||||||
(gemini-client:make-client-certificate actual-iri))))
|
(if (and certificate-cache
|
||||||
(certificate (first certificate-and-key))
|
key-cache)
|
||||||
(key (second certificate-and-key)))
|
(setf certificate certificate-cache
|
||||||
|
key key-cache)
|
||||||
|
(multiple-value-bind (certificate-new key-new)
|
||||||
|
(gemini-client:make-client-certificate actual-iri)
|
||||||
|
(setf certificate certificate-new
|
||||||
|
key key-new)))
|
||||||
(assert certificate)
|
(assert certificate)
|
||||||
(assert key)
|
(assert key)
|
||||||
(values certificate key)))
|
(values certificate key))))
|
||||||
(get-user-input (hide-input host prompt)
|
(get-user-input (hide-input host prompt)
|
||||||
(flet ((on-input-complete (input)
|
(flet ((on-input-complete (input)
|
||||||
(when (string-not-empty-p input)
|
(when (string-not-empty-p input)
|
||||||
|
|
Loading…
Reference in New Issue