diff options
Diffstat (limited to 'openpgp/src/cert.rs')
-rw-r--r-- | openpgp/src/cert.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/openpgp/src/cert.rs b/openpgp/src/cert.rs index fd5f5d0d..e1ba1b6a 100644 --- a/openpgp/src/cert.rs +++ b/openpgp/src/cert.rs @@ -7286,4 +7286,25 @@ Pu1xwz57O4zo1VYf6TqHJzVC3OMvMUM2hhdecMUe5x6GorNaj6g= Ok(()) } + + /// Tests v3 revocation signatures. + #[test] + fn v3_revocation_signature() -> Result<()> { + if ! crate::types::PublicKeyAlgorithm::ECDSA.is_supported() + || ! crate::types::Curve::NistP521.is_supported() + { + eprintln!("Skipping because ECDSA/NistP521 is not supported"); + return Ok(()); + } + + let c = Cert::from_bytes( + crate::tests::key("v4-revoked-by-v3.pgp"))?; + assert_eq!(c.bad_signatures().count(), 0); + + let sp = crate::policy::StandardPolicy::new(); + assert!(matches!(c.revocation_status(&sp, None), + RevocationStatus::Revoked(_))); + + Ok(()) + } } |