handle CSRs with no attributes

This commit is contained in:
Daniel Barlow 2024-09-29 10:19:07 +01:00
parent e4410323cf
commit a56a9ba013
1 changed files with 5 additions and 4 deletions

View File

@ -94,10 +94,11 @@
(crt:toPEM)))
(fn approve-request? [csr]
(let [attr (csr:getAttributes)]
(let [{ : challengePassword } (csr:getAttributes)]
(when challengePassword
(accumulate [found false
_ v (ipairs (. attr "challengePassword"))]
(or found (= v options.challenge-password)))))
_ v (ipairs challengePassword)]
(or found (= v options.challenge-password))))))
(fn handle-sign-csr [out]
(let [req (csr.new (out:get_body_as_string))]