summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2021-01-22 11:31:05 +0100
committerJustus Winter <justus@sequoia-pgp.org>2021-01-22 11:31:45 +0100
commit0a538fc564cf04916ae67fe2a2b7aa4056d607c7 (patch)
treefcee07bbd7fa396731370f47ff5bd7361185f6a9
parentdb90fe3eaea96d2dbaacac579fc14f9b2af7b982 (diff)
sq: Fix building against sequoia-openpgp 1.0.0.
-rw-r--r--sq/src/commands/keyring.rs9
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(())