Refuse a signature made when its key was not valid (closes #209)
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
verifySignature lets a key that has expired since verify a signature, because a manifest outlives its key, but it checked the key only as of now. It accepted a signature dated after its key expired, after the key's self-signature or the signing subkey's binding signature expired, or before the key was made. It now verifies a second time with the library's clock set to the signature's creation time and refuses the signature if the key or subkey was not valid then. docs/FORMAT.md states the rule. Judgement call: the tests make the refused signatures with the library's packet API, because openpgp.DetachSign will not sign with a key that is not valid at its clock's time. Model: opus-5-5
This commit is contained in:
+7
-3
@@ -174,9 +174,13 @@ also refuses a manifest whose `signingPubKey` holds a DSA key or subkey, or any
|
||||
secret key or subkey, since checking the self-signatures of a DSA key or the
|
||||
numbers of a secret key can take hours when those numbers are very large.
|
||||
|
||||
A signing key that has expired does not make the signature bad, because a
|
||||
manifest outlives its key. A signature past its own expiry time is not good,
|
||||
whether or not the key has expired too.
|
||||
A signature is good only if the key that made it was valid at the signature's
|
||||
creation time, meaning the key had been made by then and neither it nor its
|
||||
self-signature had expired. When a subkey made the signature, the same must hold
|
||||
of the primary key, and of the subkey and its binding signature. A key that has
|
||||
expired since does not make the signature bad, because a manifest outlives its
|
||||
key. A signature past its own expiry time is not good, whether or not the key
|
||||
has expired too.
|
||||
|
||||
## Deterministic Serialization
|
||||
|
||||
|
||||
Reference in New Issue
Block a user