handle CSRs with no attributes
This commit is contained in:
parent
e4410323cf
commit
a56a9ba013
9
main.fnl
9
main.fnl
@ -94,10 +94,11 @@
|
||||
(crt:toPEM)))
|
||||
|
||||
(fn approve-request? [csr]
|
||||
(let [attr (csr:getAttributes)]
|
||||
(accumulate [found false
|
||||
_ v (ipairs (. attr "challengePassword"))]
|
||||
(or found (= v options.challenge-password)))))
|
||||
(let [{ : challengePassword } (csr:getAttributes)]
|
||||
(when challengePassword
|
||||
(accumulate [found false
|
||||
_ v (ipairs challengePassword)]
|
||||
(or found (= v options.challenge-password))))))
|
||||
|
||||
(fn handle-sign-csr [out]
|
||||
(let [req (csr.new (out:get_body_as_string))]
|
||||
|
Loading…
Reference in New Issue
Block a user