Commit 50e101c4 authored by Justus Winter's avatar Justus Winter

Port to Sequoia 0.11.

parent d4372940
......@@ -167,7 +167,7 @@ dependencies = [
[[package]]
name = "buffered-reader"
version = "0.10.0"
version = "0.11.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)",
......@@ -1361,7 +1361,7 @@ dependencies = [
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rocket 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rocket_contrib 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"sequoia-openpgp 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sequoia-openpgp 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -1371,11 +1371,11 @@ dependencies = [
[[package]]
name = "sequoia-openpgp"
version = "0.10.0"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
"buffered-reader 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"buffered-reader 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bzip2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -1387,20 +1387,9 @@ dependencies = [
"nettle 5.0.2 (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.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sequoia-rfc2822 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "sequoia-rfc2822"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"lalrpop 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lalrpop-util 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "serde"
version = "1.0.94"
......@@ -1881,7 +1870,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400"
"checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b"
"checksum block-padding 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6d4dc3af3ee2e12f3e5d224e5e1e3d73668abbeb69e566d361f7d5563a4fdf09"
"checksum buffered-reader 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a4bfea269a54caae651cab2f4ddbaba5ba704f1d2cea557fa105c987364abc69"
"checksum buffered-reader 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2f4841b73b4705c268f16b2d808c199b7469f1011a5b845b8c68f9180d42ddaa"
"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"
......@@ -2021,8 +2010,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8f20c4be53a8a1ff4c1f1b2bd14570d2f634628709752f0702ecdd2b3f9a5267"
"checksum scoped_threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8"
"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27"
"checksum sequoia-openpgp 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5ba8c81ec75592665e81e88e5c217ce3822f989c55afe8be35f7233a4ea14835"
"checksum sequoia-rfc2822 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "270d16627fe2cc0fc9dc24f96322f72a0c829d921e2d4ee4b336d49569307361"
"checksum sequoia-openpgp 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e414fea7ba6c55d07c3752a8d8f8e14f7c96f1b83cdbb5d3fad9e17be6009a3a"
"checksum serde 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)" = "076a696fdea89c19d3baed462576b8f6d663064414b5c793642da8dfeb99475b"
"checksum serde_derive 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)" = "ef45eb79d6463b22f5f9e16d283798b7c0175ba6050bc25c1a946c122727fe7b"
"checksum serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)" = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704"
......
......@@ -10,7 +10,7 @@ vergen = "3"
[dependencies]
lazy_static = "1.4"
rocket = "0.4"
sequoia-openpgp = "0.10"
sequoia-openpgp = "0.11"
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"
......
......@@ -7,8 +7,8 @@ use self::openpgp::conversions::hex;
use self::openpgp::crypto::mpis;
use self::openpgp::{Packet, Result};
use self::openpgp::packet::prelude::*;
use self::openpgp::packet::ctb::CTB;
use self::openpgp::packet::{Header, BodyLength, Signature};
use self::openpgp::packet::header::CTB;
use self::openpgp::packet::{Header, header::BodyLength, Signature};
use self::openpgp::packet::signature::subpacket::{Subpacket, SubpacketValue};
use self::openpgp::crypto::{SessionKey, s2k::S2K};
use self::openpgp::parse::{map::Map, Parse, PacketParserResult};
......@@ -255,8 +255,8 @@ impl PacketDumper {
if let Some(h) = header {
write!(output, "{} CTB, {}: ",
if let CTB::Old(_) = h.ctb { "Old" } else { "New" },
match h.length {
if let CTB::Old(_) = h.ctb() { "Old" } else { "New" },
match h.length() {
BodyLength::Full(n) =>
format!("{} bytes", n),
BodyLength::Partial(n) =>
......@@ -666,13 +666,13 @@ impl PacketDumper {
writeln!(output, "{}", i)?;
let mut hd = hex::Dumper::new(output, self.indentation_for_hexdump(
i, map.iter()
.map(|f| if f.name == "body" { 16 } else { f.name.len() })
.map(|f| if f.name() == "body" { 16 } else { f.name().len() })
.max()
.expect("we always have one entry")));
for field in map.iter() {
if field.name == "body" {
hd.write_labeled(field.data, |offset, data| {
if field.name() == "body" {
hd.write_labeled(field.data(), |offset, data| {
let mut l = String::new();
for _ in 0..offset {
l.push(' ');
......@@ -689,7 +689,7 @@ impl PacketDumper {
Some(l)
})?;
} else {
hd.write(field.data, field.name)?;
hd.write(field.data(), field.name())?;
}
}
......
......@@ -7,7 +7,7 @@ pub fn decrypt_pkesk(pkesk: &openpgp::packet::PKESK)
lazy_static::lazy_static! {
pub static ref TPKS: Vec<openpgp::TPK> = {
vec![
openpgp::TPK::from_bytes(b"
openpgp::TPK::from_bytes("
-----BEGIN PGP PRIVATE KEY BLOCK-----
Comment: Alice's OpenPGP Transferable Secret Key
......@@ -25,7 +25,7 @@ Pnn+We1aTBhaGa86AQ==
=n8OM
-----END PGP PRIVATE KEY BLOCK-----
").unwrap(),
openpgp::TPK::from_bytes(b"
openpgp::TPK::from_bytes("
-----BEGIN PGP PRIVATE KEY BLOCK-----
Comment: Bob's OpenPGP Transferable Secret Key
......@@ -113,7 +113,7 @@ xqAY9Bwizt4FWgXuLm1a4+So4V9j1TRCXd12Uc2l2RNmgDE=
};
}
let mode = openpgp::packet::KeyFlags::default()
let mode = openpgp::constants::KeyFlags::default()
.set_encrypt_at_rest(true).set_encrypt_for_transport(true);
for tpk in TPKS.iter() {
......
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