Guard against failures when loading the narinfo signing public key
This commit is contained in:
parent
54b3d8d93a
commit
7342280ead
1 changed files with 13 additions and 2 deletions
|
|
@ -141,8 +141,19 @@
|
||||||
(assq-ref opts 'port))
|
(assq-ref opts 'port))
|
||||||
|
|
||||||
(parameterize ((%narinfo-signing-public-key
|
(parameterize ((%narinfo-signing-public-key
|
||||||
(and=> (assoc-ref opts 'narinfo-signing-public-key)
|
(catch
|
||||||
read-file-sexp))
|
'system-error
|
||||||
|
(lambda ()
|
||||||
|
(and=> (assoc-ref opts 'narinfo-signing-public-key)
|
||||||
|
read-file-sexp))
|
||||||
|
(lambda (key . args)
|
||||||
|
(simple-format
|
||||||
|
(current-error-port)
|
||||||
|
"warning: failed to load narinfo signing public key from ~A\n"
|
||||||
|
(assoc-ref opts 'narinfo-signing-private-key))
|
||||||
|
(simple-format (current-error-port)
|
||||||
|
" ~A: ~A\n"
|
||||||
|
key args))))
|
||||||
(%narinfo-signing-private-key
|
(%narinfo-signing-private-key
|
||||||
(catch
|
(catch
|
||||||
'system-error
|
'system-error
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue