mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 13:49:17 +02:00
Don't verify rsa keys on the server-side by default, even if present.
Consider a cron job to verify offline.
This commit is contained in:
parent
7fa00eb48a
commit
218ceb9144
1 changed files with 8 additions and 5 deletions
|
@ -76,17 +76,20 @@
|
|||
(email (assoc-get (cdr sig-spec) 'email))
|
||||
(rsa-key-sexp (find (rsa-identity=? email)
|
||||
(repo-publishers cfg)))
|
||||
(rsa-key (and (pair? rsa-key-sexp)
|
||||
(verify-rsa? (conf-get cfg 'verify-signatures?))
|
||||
(rsa-key (and verify-rsa?
|
||||
(pair? rsa-key-sexp)
|
||||
(extract-rsa-public-key (cdr rsa-key-sexp)))))
|
||||
(cond
|
||||
((not (equal? digest actual-digest))
|
||||
(string-append "the " digest-name " digest in the signature <" digest
|
||||
"> didn't match the actual value: <" actual-digest ">"))
|
||||
((not rsa-key)
|
||||
((and rsa-key-sexp (not rsa-key))
|
||||
(string-append "unknown publisher: " email))
|
||||
((not (rsa-verify? rsa-key
|
||||
((and verify-rsa?
|
||||
(not (rsa-verify? rsa-key
|
||||
(maybe-parse-hex digest)
|
||||
(maybe-parse-hex sig)))
|
||||
(maybe-parse-hex sig))))
|
||||
(log-error "digest: " digest " sig: " (maybe-parse-hex sig)
|
||||
" verify: " (rsa-encrypt rsa-key digest))
|
||||
"rsa signature did not match")
|
||||
|
|
Loading…
Add table
Reference in a new issue