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