gnupdate: Support signatures with expired keys.
* maintainers/scripts/gnu/gnupdate (gnupg-verify)[expkeysig-rx]: New variable. Recognize signatures with expired keys. (gnupg-status-good-signature?): Recognize `expired-key-signature' as good. svn path=/nixpkgs/trunk/; revision=30667
This commit is contained in:
parent
be5e1088f6
commit
dee4d2f6af
@ -441,6 +441,8 @@ the file at URL."
|
|||||||
(define validsig-rx
|
(define validsig-rx
|
||||||
(make-regexp
|
(make-regexp
|
||||||
"^\\[GNUPG:\\] VALIDSIG ([[:xdigit:]]+) ([[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}) ([[:digit:]]+) .*$"))
|
"^\\[GNUPG:\\] VALIDSIG ([[:xdigit:]]+) ([[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}) ([[:digit:]]+) .*$"))
|
||||||
|
(define expkeysig-rx ; good signature, but expired key
|
||||||
|
(make-regexp "^\\[GNUPG:\\] EXPKEYSIG ([[:xdigit:]]+) (.*)$"))
|
||||||
(define errsig-rx
|
(define errsig-rx
|
||||||
(make-regexp
|
(make-regexp
|
||||||
"^\\[GNUPG:\\] ERRSIG ([[:xdigit:]]+) ([^ ]+) ([^ ]+) ([^ ]+) ([[:digit:]]+) ([[:digit:]]+)"))
|
"^\\[GNUPG:\\] ERRSIG ([[:xdigit:]]+) ([^ ]+) ([^ ]+) ([^ ]+) ([[:digit:]]+) ([[:digit:]]+)"))
|
||||||
@ -464,6 +466,11 @@ the file at URL."
|
|||||||
,(match:substring match 2) ; sig creation date
|
,(match:substring match 2) ; sig creation date
|
||||||
,(string->number ; timestamp
|
,(string->number ; timestamp
|
||||||
(match:substring match 3)))))
|
(match:substring match 3)))))
|
||||||
|
((regexp-exec expkeysig-rx line)
|
||||||
|
=>
|
||||||
|
(lambda (match)
|
||||||
|
`(expired-key-signature ,(match:substring match 1) ; fingerprint
|
||||||
|
,(match:substring match 2)))) ; user name
|
||||||
((regexp-exec errsig-rx line)
|
((regexp-exec errsig-rx line)
|
||||||
=>
|
=>
|
||||||
(lambda (match)
|
(lambda (match)
|
||||||
@ -504,7 +511,7 @@ the file at URL."
|
|||||||
a key-id/user pair; return #f otherwise."
|
a key-id/user pair; return #f otherwise."
|
||||||
(any (lambda (sexp)
|
(any (lambda (sexp)
|
||||||
(match sexp
|
(match sexp
|
||||||
(('good-signature key-id user)
|
(((or 'good-signature 'expired-key-signature) key-id user)
|
||||||
(cons key-id user))
|
(cons key-id user))
|
||||||
(_ #f)))
|
(_ #f)))
|
||||||
status))
|
status))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user