keyfork-derive-openpgp: fmt
This commit is contained in:
parent
55ff62052b
commit
4e83be47c0
|
@ -1,24 +1,11 @@
|
||||||
use std::{
|
use std::{env, str::FromStr};
|
||||||
env,
|
|
||||||
str::FromStr,
|
|
||||||
time::{Duration, SystemTime},
|
|
||||||
};
|
|
||||||
|
|
||||||
use ed25519_dalek::SigningKey;
|
|
||||||
use keyfork_derive_util::{
|
use keyfork_derive_util::{
|
||||||
request::{DerivationAlgorithm, DerivationRequest},
|
request::{DerivationAlgorithm, DerivationRequest},
|
||||||
DerivationIndex, DerivationPath, ExtendedPrivateKey, PrivateKey,
|
DerivationIndex, DerivationPath,
|
||||||
};
|
};
|
||||||
use keyforkd_client::Client;
|
use keyforkd_client::Client;
|
||||||
use sequoia_openpgp::{
|
use sequoia_openpgp::{packet::UserID, types::KeyFlags};
|
||||||
packet::{
|
|
||||||
key::{Key4, PrimaryRole, SubordinateRole},
|
|
||||||
signature::SignatureBuilder,
|
|
||||||
Key, UserID,
|
|
||||||
},
|
|
||||||
types::{KeyFlags, SignatureType},
|
|
||||||
Cert, Packet,
|
|
||||||
};
|
|
||||||
|
|
||||||
#[derive(Debug, thiserror::Error)]
|
#[derive(Debug, thiserror::Error)]
|
||||||
enum Error {
|
enum Error {
|
||||||
|
@ -121,7 +108,10 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
|
|
||||||
let request = DerivationRequest::new(DerivationAlgorithm::Ed25519, &path);
|
let request = DerivationRequest::new(DerivationAlgorithm::Ed25519, &path);
|
||||||
let derived_data = Client::discover_socket()?.request(&request)?;
|
let derived_data = Client::discover_socket()?.request(&request)?;
|
||||||
let subkeys = subkey_format.iter().map(|kt| kt.inner().clone()).collect::<Vec<_>>();
|
let subkeys = subkey_format
|
||||||
|
.iter()
|
||||||
|
.map(|kt| kt.inner().clone())
|
||||||
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
let cert = keyfork_derive_openpgp::derive(derived_data, subkeys.as_slice(), default_userid)?;
|
let cert = keyfork_derive_openpgp::derive(derived_data, subkeys.as_slice(), default_userid)?;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue