diff options
author | Neal H. Walfield <neal@pep.foundation> | 2019-09-11 11:38:12 +0200 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2019-09-17 10:43:10 +0200 |
commit | aae0f0fecbfa688dbbdf8f5012088220af753737 (patch) | |
tree | 33fa88f66926a42521132341715e16b3a49459b0 /sqv | |
parent | 0012dc4f4f99d2c4aea94bc63dc64e126cd3a306 (diff) |
openpgp: Fix TPK and TPK component revocation handling.
- Consider a TPK, subkey, User ID, or User Attribute to be revoked
at time `t` if the most recent revocation certificate that is live
at time `t` is younger than the most recent self signature that is
live at time `t`.
- Further, consider a TPK or a subkey to be revoked at all times if
there is a hard revocation (i.e., independent of what time that
revocation was created and whether or not the revocation is alive
at time `t`).
Diffstat (limited to 'sqv')
-rw-r--r-- | sqv/tests/revoked-key.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sqv/tests/revoked-key.rs b/sqv/tests/revoked-key.rs index 1cc74d3c..650b7bd1 100644 --- a/sqv/tests/revoked-key.rs +++ b/sqv/tests/revoked-key.rs @@ -6,7 +6,8 @@ mod integration { use std::path; #[test] - fn valid_at_signature_ctime() { + fn not_valid_at_signature_ctime() { + // A hard revocation is never ignored. Assert::cargo_binary("sqv") .current_dir(path::Path::new("tests").join("data")) .with_args( @@ -14,7 +15,7 @@ mod integration { &"revoked-unrevoked.key", &"rev-unrev-t1-t2.sig", &"msg.txt"]) - .stdout().is("7859 B79C 7312 7826 6852 15BE 8254 0C25 2B52 1ED8") + .fails() .unwrap(); } @@ -32,7 +33,8 @@ mod integration { } #[test] - fn valid_now() { + fn unrevoked() { + // Hard revocations are never ignored. Assert::cargo_binary("sqv") .current_dir(path::Path::new("tests").join("data")) .with_args( @@ -40,7 +42,7 @@ mod integration { &"revoked-unrevoked.key", &"rev-unrev-t3-now.sig", &"msg.txt"]) - .stdout().is("7859 B79C 7312 7826 6852 15BE 8254 0C25 2B52 1ED8") + .fails() .unwrap(); } } |