Compare commits

..

No commits in common. "8afcae54473a3c0790b340ba7ed5317e1eae04a0" and "f41fd18afb5838735d249c0cc1fda8f6a130ee05" have entirely different histories.

2 changed files with 10 additions and 23 deletions

View File

@ -1,4 +1,4 @@
use std::{env, str::FromStr, process::ExitCode};
use std::{env, str::FromStr};
use keyfork_derive_util::{
request::{DerivationAlgorithm, DerivationRequest},
@ -97,7 +97,7 @@ fn validate(
Ok((path, subkey_format, UserID::from(default_userid)))
}
fn run() -> Result<(), Box<dyn std::error::Error>> {
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut args = env::args();
let program_name = args.next().expect("program name");
let args = args.collect::<Vec<_>>();
@ -120,7 +120,7 @@ fn run() -> Result<(), Box<dyn std::error::Error>> {
serialize::Marshal,
};
let mut w = Writer::new(std::io::stdout(), Kind::SecretKey)?;
let mut w = Writer::new(std::io::stdout(), Kind::Message)?;
for packet in cert.into_packets() {
packet.serialize(&mut w)?;
@ -130,12 +130,3 @@ fn run() -> Result<(), Box<dyn std::error::Error>> {
Ok(())
}
fn main() -> ExitCode {
if let Err(e) = run() {
eprintln!("Error: {e}");
ExitCode::FAILURE
} else {
ExitCode::SUCCESS
}
}

View File

@ -9,8 +9,8 @@ applications.
Once a user has generated a mnemonic with [`keyfork mnemonic generate`], the
mnemonic can be loaded to [`keyforkd`]. This is typically done automatically by
[`keyfork`], but plumbing binaries (commands that are not `keyfork`, such as
`keyfork-derive-key`) require the server to be started manually.
[`keyfork`], but plumbing binaries (commands that are not `keyfork`) require
the server to be started manually.
**NOTE:** Anything beyond this point should be considered Design by
Documentation, and while the commands are not likely to change between now and
@ -18,14 +18,11 @@ when they are released, there is no current stable interface for these
commands, and they may change at any time.
Users can then "provision" keys, or automatically deploy generated keys to
specific endpoints. Running `keyfork provision` will automatically list all
known provisioners, while running `keyfork provision help <provisioner>` will
include detailed information about the specific provisioner. For OpenPGP
smartcards (such as Yubikeys), `keyfork provision openpgp-card` will
automatically derive an OpenPGP key and provision it to a smartcard. As
previously mentioned, if `keyforkd` was not previously started, a prompt will
be provided by the provisioner for the mnemonic, and `keyforkd` will be started
in the background.
specific endpoints. For OpenPGP smartcards (such as Yubikeys), `keyfork
provision openpgp-card` will automatically derive an OpenPGP key and provision
it to a smartcard. As previously mentioned, if `keyforkd` was not previously
started, a prompt will be provided by the provisioner for the mnemonic, and
`keyforkd` will be started in the background.
Any usage of `keyfork provision` or `keyfork derive` can also be given the
`--save` flag, to modify a `keyfork.toml` file and record when the key was
@ -39,4 +36,3 @@ invoked derivation, through an interactive prompt.
[BIP-0032]: https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki
[`keyfork mnemonic generate`]: ./bin/keyfork/mnemonic/index.md#generate
[`keyforkd`]: ./bin/keyforkd.md
[`keyfork`]: ./bin/keyfork.md