diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-11-28 15:27:33 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-11-28 16:26:43 +0100 |
commit | bbbc6da375d6584c7b2bcc74e838fff943f489d4 (patch) | |
tree | 0a965698c96dbc0fc8541c6adc2224935b68bc07 /tool/src/commands/key.rs | |
parent | f53c77752ff04c3713c175a76a06723042e681ae (diff) |
Call TPKs Certificates, update identifiers, documentation.
- Fixes #387.
Diffstat (limited to 'tool/src/commands/key.rs')
-rw-r--r-- | tool/src/commands/key.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tool/src/commands/key.rs b/tool/src/commands/key.rs index 1d825bf8..8617cc9f 100644 --- a/tool/src/commands/key.rs +++ b/tool/src/commands/key.rs @@ -4,7 +4,7 @@ use clap::ArgMatches; use itertools::Itertools; use crate::openpgp::Packet; -use crate::openpgp::tpk::{TPKBuilder, CipherSuite}; +use crate::openpgp::cert::{CertBuilder, CipherSuite}; use crate::openpgp::types::KeyFlags; use crate::openpgp::armor::{Writer, Kind}; use crate::openpgp::serialize::Serialize; @@ -12,7 +12,7 @@ use crate::openpgp::serialize::Serialize; use crate::create_or_stdout; pub fn generate(m: &ArgMatches, force: bool) -> failure::Fallible<()> { - let mut builder = TPKBuilder::new(); + let mut builder = CertBuilder::new(); // User ID match m.values_of("userid") { @@ -184,7 +184,7 @@ pub fn generate(m: &ArgMatches, force: bool) -> failure::Fallible<()> { } // Generate the key - let (tpk, rev) = builder.generate()?; + let (cert, rev) = builder.generate()?; // Export if m.is_present("export") { @@ -210,7 +210,7 @@ pub fn generate(m: &ArgMatches, force: bool) -> failure::Fallible<()> { --export")), }; - let headers = tpk.armor_headers(); + let headers = cert.armor_headers(); // write out key { @@ -220,7 +220,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, &headers)?; - tpk.as_tsk().serialize(&mut w)?; + cert.as_tsk().serialize(&mut w)?; } // write out rev cert |