diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2021-01-21 12:39:02 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2021-01-21 12:39:02 +0100 |
commit | 6e555106da58e943a7f2a3091c89c282232fc968 (patch) | |
tree | e5720d4505c8f20c1966d5ea7511f8a5dc28d005 /sq/tests | |
parent | dee5ed06846b7eb9167a19128da100532330271f (diff) |
sq: Make it build with sequoia-openpgp 1.0.0.
- This backports a few functions that are not yet available in
sequoia-openpgp 1.0.0, and disables a test covering an odd
corner case.
- Once sq depends on sequoia-openpgp 1.1.0, this commit can be
reverted.
Diffstat (limited to 'sq/tests')
-rw-r--r-- | sq/tests/sq-certify.rs | 6 | ||||
-rw-r--r-- | sq/tests/sq-key-adopt.rs | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/sq/tests/sq-certify.rs b/sq/tests/sq-certify.rs index 7dbc8d99..81a2fdfe 100644 --- a/sq/tests/sq-certify.rs +++ b/sq/tests/sq-certify.rs @@ -122,7 +122,11 @@ fn sq_certify() -> Result<()> { "--expires-in", "1d", ]) .stdout().satisfies(|output| { - let p = &StandardPolicy::new(); + let p = &mut StandardPolicy::new(); + // XXX: Compat with sequoia-openpgp 1.0.0: + use openpgp::packet::signature::subpacket::SubpacketTag; + p.accept_critical_subpacket(SubpacketTag::TrustSignature); + p.accept_critical_subpacket(SubpacketTag::RegularExpression); let cert = Cert::from_bytes(output).unwrap(); let vc = cert.with_policy(p, None).unwrap(); diff --git a/sq/tests/sq-key-adopt.rs b/sq/tests/sq-key-adopt.rs index 5bb40f32..0bebe2a4 100644 --- a/sq/tests/sq-key-adopt.rs +++ b/sq/tests/sq-key-adopt.rs @@ -255,7 +255,10 @@ mod integration { Ok(()) } - #[test] + // XXX: Compat with sequoia-openpgp 1.0.0, which just doesn't + // handle this correctly. However, this case is a bit bonkers, so + // we'll just ignore it for now. + #[allow(dead_code)] fn adopt_own_primary() -> Result<()> { // Adopt own primary key. Assert::cargo_binary("sq").with_args(&[ |