diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2021-01-22 11:31:05 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2021-01-22 11:31:45 +0100 |
commit | 0a538fc564cf04916ae67fe2a2b7aa4056d607c7 (patch) | |
tree | fcee07bbd7fa396731370f47ff5bd7361185f6a9 /sq | |
parent | db90fe3eaea96d2dbaacac579fc14f9b2af7b982 (diff) |
sq: Fix building against sequoia-openpgp 1.0.0.
Diffstat (limited to 'sq')
-rw-r--r-- | sq/src/commands/keyring.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sq/src/commands/keyring.rs b/sq/src/commands/keyring.rs index a7650907..2f30da75 100644 --- a/sq/src/commands/keyring.rs +++ b/sq/src/commands/keyring.rs @@ -257,7 +257,14 @@ fn split(input: &mut (dyn io::Read + Sync + Send), prefix: &str, binary: bool) if binary { cert.as_tsk().serialize(&mut sink)?; } else { - cert.as_tsk().armored().serialize(&mut sink)?; + use sequoia_openpgp::serialize::stream::{Message, Armorer}; + let message = Message::new(sink); + let mut message = Armorer::new(message) + // XXX: should detect kind, see above + .kind(sequoia_openpgp::armor::Kind::PublicKey) + .build()?; + cert.as_tsk().serialize(&mut message)?; + message.finalize()?; } } Ok(()) |