Compare commits
3 Commits
f41fd18afb
...
8afcae5447
Author | SHA1 | Date |
---|---|---|
Ryan Heywood | 8afcae5447 | |
Ryan Heywood | 008390d087 | |
Ryan Heywood | bc5bd8a7b9 |
|
@ -1,4 +1,4 @@
|
||||||
use std::{env, str::FromStr};
|
use std::{env, str::FromStr, process::ExitCode};
|
||||||
|
|
||||||
use keyfork_derive_util::{
|
use keyfork_derive_util::{
|
||||||
request::{DerivationAlgorithm, DerivationRequest},
|
request::{DerivationAlgorithm, DerivationRequest},
|
||||||
|
@ -97,7 +97,7 @@ fn validate(
|
||||||
Ok((path, subkey_format, UserID::from(default_userid)))
|
Ok((path, subkey_format, UserID::from(default_userid)))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
fn run() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
let mut args = env::args();
|
let mut args = env::args();
|
||||||
let program_name = args.next().expect("program name");
|
let program_name = args.next().expect("program name");
|
||||||
let args = args.collect::<Vec<_>>();
|
let args = args.collect::<Vec<_>>();
|
||||||
|
@ -120,7 +120,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
serialize::Marshal,
|
serialize::Marshal,
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut w = Writer::new(std::io::stdout(), Kind::Message)?;
|
let mut w = Writer::new(std::io::stdout(), Kind::SecretKey)?;
|
||||||
|
|
||||||
for packet in cert.into_packets() {
|
for packet in cert.into_packets() {
|
||||||
packet.serialize(&mut w)?;
|
packet.serialize(&mut w)?;
|
||||||
|
@ -130,3 +130,12 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn main() -> ExitCode {
|
||||||
|
if let Err(e) = run() {
|
||||||
|
eprintln!("Error: {e}");
|
||||||
|
ExitCode::FAILURE
|
||||||
|
} else {
|
||||||
|
ExitCode::SUCCESS
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -9,8 +9,8 @@ applications.
|
||||||
|
|
||||||
Once a user has generated a mnemonic with [`keyfork mnemonic generate`], the
|
Once a user has generated a mnemonic with [`keyfork mnemonic generate`], the
|
||||||
mnemonic can be loaded to [`keyforkd`]. This is typically done automatically by
|
mnemonic can be loaded to [`keyforkd`]. This is typically done automatically by
|
||||||
[`keyfork`], but plumbing binaries (commands that are not `keyfork`) require
|
[`keyfork`], but plumbing binaries (commands that are not `keyfork`, such as
|
||||||
the server to be started manually.
|
`keyfork-derive-key`) require the server to be started manually.
|
||||||
|
|
||||||
**NOTE:** Anything beyond this point should be considered Design by
|
**NOTE:** Anything beyond this point should be considered Design by
|
||||||
Documentation, and while the commands are not likely to change between now and
|
Documentation, and while the commands are not likely to change between now and
|
||||||
|
@ -18,11 +18,14 @@ when they are released, there is no current stable interface for these
|
||||||
commands, and they may change at any time.
|
commands, and they may change at any time.
|
||||||
|
|
||||||
Users can then "provision" keys, or automatically deploy generated keys to
|
Users can then "provision" keys, or automatically deploy generated keys to
|
||||||
specific endpoints. For OpenPGP smartcards (such as Yubikeys), `keyfork
|
specific endpoints. Running `keyfork provision` will automatically list all
|
||||||
provision openpgp-card` will automatically derive an OpenPGP key and provision
|
known provisioners, while running `keyfork provision help <provisioner>` will
|
||||||
it to a smartcard. As previously mentioned, if `keyforkd` was not previously
|
include detailed information about the specific provisioner. For OpenPGP
|
||||||
started, a prompt will be provided by the provisioner for the mnemonic, and
|
smartcards (such as Yubikeys), `keyfork provision openpgp-card` will
|
||||||
`keyforkd` will be started in the background.
|
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
|
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
|
`--save` flag, to modify a `keyfork.toml` file and record when the key was
|
||||||
|
@ -36,3 +39,4 @@ invoked derivation, through an interactive prompt.
|
||||||
[BIP-0032]: https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki
|
[BIP-0032]: https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki
|
||||||
[`keyfork mnemonic generate`]: ./bin/keyfork/mnemonic/index.md#generate
|
[`keyfork mnemonic generate`]: ./bin/keyfork/mnemonic/index.md#generate
|
||||||
[`keyforkd`]: ./bin/keyforkd.md
|
[`keyforkd`]: ./bin/keyforkd.md
|
||||||
|
[`keyfork`]: ./bin/keyfork.md
|
||||||
|
|
Loading…
Reference in New Issue