Port to Sequoia 0.17.

parent 6c15a05d
......@@ -52,10 +52,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "backtrace"
version = "0.3.40"
version = "0.3.46"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
"backtrace-sys 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -63,7 +63,7 @@ dependencies = [
[[package]]
name = "backtrace-sys"
version = "0.1.32"
version = "0.1.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -150,7 +150,7 @@ dependencies = [
[[package]]
name = "buffered-reader"
version = "0.16.0"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bzip2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -392,7 +392,7 @@ name = "error-chain"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)",
"backtrace 0.3.46 (registry+https://github.com/rust-lang/crates.io-index)",
"version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
......@@ -401,7 +401,7 @@ name = "failure"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)",
"backtrace 0.3.46 (registry+https://github.com/rust-lang/crates.io-index)",
"failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
......@@ -715,7 +715,7 @@ dependencies = [
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rayon 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rlimit 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"sequoia-openpgp 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sequoia-openpgp 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)",
"tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -828,15 +828,6 @@ dependencies = [
"unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "quickcheck"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "quote"
version = "1.0.2"
......@@ -1112,12 +1103,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "sequoia-openpgp"
version = "0.16.0"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"anyhow 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)",
"backtrace 0.3.46 (registry+https://github.com/rust-lang/crates.io-index)",
"base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"buffered-reader 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)",
"buffered-reader 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bzip2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)",
"idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -1127,8 +1119,6 @@ dependencies = [
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
"memsec 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
"nettle 7.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"quickcheck 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"thiserror 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-normalization 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -1497,8 +1487,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum ascii-canvas 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff8eb72df928aafb99fe5d37b383f2fe25bd2a765e3e5f7c365916b6f2463a29"
"checksum atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90"
"checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2"
"checksum backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)" = "924c76597f0d9ca25d762c25a4d369d51267536465dc5064bdf0eb073ed477ea"
"checksum backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6575f128516de27e3ce99689419835fce9643a9b215a14d2b5b685be018491"
"checksum backtrace 0.3.46 (registry+https://github.com/rust-lang/crates.io-index)" = "b1e692897359247cc6bb902933361652380af0f1b7651ae5c5013407f30e109e"
"checksum backtrace-sys 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "18fbebbe1c9d1f383a9cc7e8ccdb471b91c8d024ee9c2ca5b5346121fe8b4399"
"checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e"
"checksum base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7"
"checksum bindgen 0.51.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ebd71393f1ec0509b553aa012b9b58e81dadbdff7130bd3b8cba576e69b32f75"
......@@ -1508,7 +1498,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum blake2b_simd 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b83b7baab1e671718d78204225800d6b170e648188ac7dc992e9d6bddf87d0c0"
"checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b"
"checksum block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5"
"checksum buffered-reader 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "481b9e70e6e308e620f0cd39e1d3f792c4c8dad84ffa7764a41d7aede0d6565d"
"checksum buffered-reader 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2036ba174da63bef4efd91b483cd67913aaeeb471817b8a68bd8380779885090"
"checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7"
"checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5"
"checksum bzip2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "42b7c3cbf0fa9c1b82308d57191728ca0256cb821220f4e2fd410a72ade26e3b"
......@@ -1592,7 +1582,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b"
"checksum precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
"checksum proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9c9e470a8dc4aeae2dee2f335e8f533e2d4b347e1434e5671afc49b054592f27"
"checksum quickcheck 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d5ca504a2fdaa08d3517f442fbbba91ac24d1ec4c51ea68688a038765e3b2662"
"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe"
"checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca"
"checksum rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3ae1b169243eaf61759b8475a998f0a385e42042370f3a7dbaf35246eacc8412"
......@@ -1625,7 +1614,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d"
"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
"checksum sequoia-openpgp 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "430f2ce4030d325034a6581aacc7a67e05beccb8b87d520909eaf7122dc618ea"
"checksum sequoia-openpgp 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "725aa10d2a0cec18815f441dbc3b6f68f6e5c15560f7bfb4f21cd983f4517229"
"checksum serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4b39bd9b0b087684013a792c59e3e07a46a01d2322518d8a1104641a0b1be0"
"checksum serde_derive 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)" = "ca13fc1a832f793322228923fbb3aba9f3f44444898f835d31ad1b74fa0a2bf8"
"checksum serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)" = "2f72eb2a68a7dc3f9a691bfda9305a1c017a6215e5a4545c258500d2099a37c2"
......
......@@ -21,7 +21,7 @@ indicatif = { version = "0.12" }
lazy_static = "1.4"
rayon = "1.2"
rlimit = "0.2.1"
sequoia-openpgp = "0.16"
sequoia-openpgp = "0.17"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tempfile = "3.1"
......
......@@ -52,7 +52,7 @@ impl DKGPG {
// Already armored.
f.write_all(o.as_ref())?;
} else {
let mut sink = openpgp::armor::Writer::new(&mut f, kind, &[])?;
let mut sink = openpgp::armor::Writer::new(&mut f, kind)?;
sink.write_all(o.as_ref())?;
sink.finalize()?;
}
......
......@@ -182,10 +182,10 @@ fn pgp2string(v: tera::Value,
if ! armored {
let mut armored = Vec::new();
{
let mut writer = openpgp::armor::Writer::new(
let mut writer = openpgp::armor::Writer::with_headers(
&mut armored, openpgp::armor::Kind::File,
&[("Comment",
"ASCII Armor added by openpgp-interoperability-test-suite")])
Some(("Comment",
"ASCII Armor added by openpgp-interoperability-test-suite")))
.unwrap();
writer.write_all(&bytes[..]).unwrap();
writer.finalize().unwrap();
......
......@@ -51,8 +51,9 @@ impl EncryptDecryptRoundtrip {
-> Result<EncryptDecryptRoundtrip>
{
// Change the cipher preferences of CERT.
let uid = cert.primary_userid(super::P, None).unwrap();
let mut builder = openpgp::packet::signature::Builder::from(
let uid = cert.with_policy(super::P, None).unwrap()
.primary_userid().unwrap();
let mut builder = openpgp::packet::signature::SignatureBuilder::from(
uid.binding_signature().clone())
.set_signature_creation_time(Timestamp::now())?
.set_preferred_symmetric_algorithms(vec![cipher])?;
......@@ -65,7 +66,7 @@ impl EncryptDecryptRoundtrip {
cert.primary_key()
.key().clone().parts_into_secret()?.into_keypair()?;
let new_sig = uid.bind(&mut primary_keypair, &cert, builder)?;
let cert = cert.merge_packets(vec![new_sig.into()])?;
let cert = cert.merge_packets(Some(new_sig))?;
let key = cert.as_tsk().to_vec()?;
let cert = cert.to_vec()?;
......@@ -142,7 +143,7 @@ impl ProducerConsumerTest for EncryptDecryptRoundtrip {
.key_flags(mode.clone())
{
let mut keypair = ka.key().clone().into_keypair()?;
if let Ok((a, _)) = p.decrypt(&mut keypair, None) {
if let Some((a, _)) = p.decrypt(&mut keypair, None) {
if a == cipher {
ok = true;
break 'search;
......
This diff is collapsed.
This diff is collapsed.
......@@ -24,7 +24,7 @@ fn make<B: AsRef<[u8]>>(test: &str, b: B, kind: armor::Kind)
{
let mut buf = Vec::new();
{
let mut w = armor::Writer::new(&mut buf, kind, &[])?;
let mut w = armor::Writer::new(&mut buf, kind)?;
w.write_all(b.as_ref())?;
w.finalize()?;
}
......@@ -290,7 +290,8 @@ impl ConsumerTest for MarkerPacket {
-> Result<Data> {
// Peek at the data to decide what to do.
let pp = openpgp::PacketPile::from_bytes(artifact)?;
if let Some(openpgp::Packet::PublicKey(_)) = pp.children().nth(1) {
let mut children = pp.children();
if let Some(openpgp::Packet::PublicKey(_)) = children.nth(1) {
// A certificate.
let ciphertext = pgp.encrypt(artifact, b"Marker + Certificate")?;
pgp.decrypt(data::certificate("bob-secret.pgp"), &ciphertext)
......
......@@ -90,7 +90,7 @@ impl ConsumerTest for SymmetricEncryptionSupport {
let stack = Message::new(&mut b);
let stack = match
Encryptor::for_recipients(stack, vec![recipient])
.sym_algo(cipher)
.symmetric_algo(cipher)
.build()
{
Ok(stack) => stack,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment