Skip to content

Commit

Permalink
cargo fmt + bump Cargo.lock
Browse files Browse the repository at this point in the history
  • Loading branch information
nickray committed Jan 7, 2022
1 parent 6bac36d commit b95d562
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 125 deletions.
81 changes: 35 additions & 46 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 10 additions & 12 deletions src/bin/solo2/cli.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use clap::{self, crate_authors, crate_version, AppSettings, Args, ArgEnum, Parser, Subcommand};
use clap::{self, crate_authors, crate_version, AppSettings, ArgEnum, Args, Parser, Subcommand};

/// solo2 is the go-to tool to interact with a Solo 2 security key.
///
Expand Down Expand Up @@ -50,7 +50,7 @@ pub enum Subcommands {
all: bool,
/// Update to a specific firmware secure boot file (.sb2)
firmware: Option<String>,
}
},
}

#[derive(Subcommand)]
Expand All @@ -61,7 +61,6 @@ pub enum Bootloader {
/// List all available bootloaders
#[clap(visible_alias = "ls")]
List,

// NB: If we convert lpc55-host to clap 3, should be possible
// to slot in its CLI here.

Expand Down Expand Up @@ -89,7 +88,7 @@ pub enum Ca {
FetchCertificate {
/// Name of authority, e.g. R1, T1, S3, etc.
authority: String,
}
},
}

#[derive(Subcommand)]
Expand All @@ -101,7 +100,7 @@ pub enum Dev {
key: String,
/// Output file for self-signed certificate in DER format
cert: String,
}
},
}

#[derive(Subcommand)]
Expand Down Expand Up @@ -174,7 +173,7 @@ pub enum Oath {
/// Delete existing credential
Delete {
/// Label of credential
label: String
label: String,
},
/// List all credentials
List,
Expand Down Expand Up @@ -206,17 +205,16 @@ pub struct OathRegister {
pub kind: OathKind,

/// (only HOTP) initial counter to use for HOTPs
#[clap(default_value = "0", long, short)]//, required_if_eq("kind", "hotp"))]
#[clap(default_value = "0", long, short)] //, required_if_eq("kind", "hotp"))]
pub counter: u32,

/// number of digits to output
#[clap(default_value = "6", possible_values=["6", "7", "8"], long, short)]
pub digits: u8,

/// (only TOTP) period in seconds for which a TOTP is valid
#[clap(default_value = "30", long, short)]//, required_if_eq("kind", "totp"))]
#[clap(default_value = "30", long, short)] //, required_if_eq("kind", "totp"))]
pub period: u32,

}

// ignore case?
Expand Down Expand Up @@ -275,17 +273,17 @@ pub enum Provision {
/// Store Trussed T1 intermediate public key
StoreT1Pubkey {
/// Ed255 public key (raw, 32 bytes)
bytes: String
bytes: String,
},
/// Store FIDO batch attestation certificate
StoreFidoBatchCert {
/// Attestation certificate
cert: String
cert: String,
},
/// Store FIDO batch attestation private key
StoreFidoBatchKey {
/// P256 private key in internal format
bytes: String
bytes: String,
},

/// Reformat the internal filesystem
Expand Down
Loading

0 comments on commit b95d562

Please sign in to comment.