summaryrefslogtreecommitdiffstats
path: root/tool
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-04-26 14:34:36 +0200
committerJustus Winter <justus@sequoia-pgp.org>2019-04-29 14:55:56 +0200
commit1fa018acc90194e1cd1ddf2bd0c6706000a3bc9e (patch)
treec29ecc4aac1d2d85e1ff08a111d1462b74c6f3e8 /tool
parentd53cb0c4df33ebabd1af7e97e8469ed159763a6e (diff)
openpgp: New TSK type.
- With a1e226f8f1418de43e577fdaa1d087b68bbb09ae in place, we have a more general way to add components to a TPK. Retire the current `TSK` type and replace it with a thin shim that only allows serialization of secret keys. - Fixes #107.
Diffstat (limited to 'tool')
-rw-r--r--tool/src/commands/key.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/tool/src/commands/key.rs b/tool/src/commands/key.rs
index 91b2d941..fbbfcb5e 100644
--- a/tool/src/commands/key.rs
+++ b/tool/src/commands/key.rs
@@ -84,7 +84,6 @@ pub fn generate(m: &ArgMatches, force: bool) -> failure::Fallible<()> {
// Generate the key
let (tpk, rev) = builder.generate()?;
- let tsk = tpk.into_tsk();
// Export
if m.is_present("export") {
@@ -114,7 +113,7 @@ pub fn generate(m: &ArgMatches, force: bool) -> failure::Fallible<()> {
{
let w = create_or_stdout(Some(&key_path), force)?;
let mut w = Writer::new(w, Kind::SecretKey, &[])?;
- tsk.serialize(&mut w)?;
+ tpk.as_tsk().serialize(&mut w)?;
}
// write out rev cert