summaryrefslogtreecommitdiffstats
path: root/tool
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2018-11-16 11:04:36 +0100
committerJustus Winter <justus@sequoia-pgp.org>2018-12-14 14:05:21 +0100
commitd411fb80983a4d4ebb9f023599c38e34a26551e7 (patch)
treefc970ff950923f7c400b24163f4079b3c6ba48cf /tool
parent251541318fdf453c5d756794b906cce2fd69b675 (diff)
openpgp: Introduce trait Parse.
- Trait Parse introduces a uniform interface to parse packets, messages, keys, and related data structures.
Diffstat (limited to 'tool')
-rw-r--r--tool/src/commands/dump.rs2
-rw-r--r--tool/src/commands/mod.rs5
-rw-r--r--tool/src/sq.rs1
-rw-r--r--tool/tests/sq-sign.rs1
4 files changed, 7 insertions, 2 deletions
diff --git a/tool/src/commands/dump.rs b/tool/src/commands/dump.rs
index 02980b59..d78c49a8 100644
--- a/tool/src/commands/dump.rs
+++ b/tool/src/commands/dump.rs
@@ -7,7 +7,7 @@ use openpgp::packet::ctb::CTB;
use openpgp::packet::{Header, BodyLength, Signature};
use openpgp::packet::signature::subpacket::{Subpacket, SubpacketValue};
use openpgp::crypto::s2k::S2K;
-use openpgp::parse::{map::Map, PacketParserResult};
+use openpgp::parse::{map::Map, Parse, PacketParserResult};
use super::TIMEFMT;
diff --git a/tool/src/commands/mod.rs b/tool/src/commands/mod.rs
index eb95f755..7255381e 100644
--- a/tool/src/commands/mod.rs
+++ b/tool/src/commands/mod.rs
@@ -14,7 +14,10 @@ use openpgp::armor;
use openpgp::constants::DataFormat;
use openpgp::{Packet, TPK, KeyID, Error, Result};
use openpgp::packet::Signature;
-use openpgp::parse::PacketParserResult;
+use openpgp::parse::{
+ Parse,
+ PacketParserResult,
+};
use openpgp::parse::stream::{
Verifier, DetachedVerifier, VerificationResult, VerificationHelper,
};
diff --git a/tool/src/sq.rs b/tool/src/sq.rs
index 2e429179..244fecf9 100644
--- a/tool/src/sq.rs
+++ b/tool/src/sq.rs
@@ -22,6 +22,7 @@ extern crate sequoia_net;
extern crate sequoia_store;
use openpgp::{armor, autocrypt, Fingerprint, TPK};
+use openpgp::parse::Parse;
use openpgp::serialize::Serialize;
use sequoia_core::{Context, NetworkPolicy};
use sequoia_net::KeyServer;
diff --git a/tool/tests/sq-sign.rs b/tool/tests/sq-sign.rs
index 696f662e..28fcce64 100644
--- a/tool/tests/sq-sign.rs
+++ b/tool/tests/sq-sign.rs
@@ -9,6 +9,7 @@ use tempfile::TempDir;
extern crate sequoia_openpgp as openpgp;
use openpgp::{Packet, PacketPile, TPK};
use openpgp::constants::{CompressionAlgorithm, DataFormat, SignatureType};
+use openpgp::parse::Parse;
use openpgp::serialize::stream::{Message, Signer, Compressor, LiteralWriter};
fn p(filename: &str) -> String {