aboutsummaryrefslogtreecommitdiff
path: root/nitrocli
diff options
context:
space:
mode:
Diffstat (limited to 'nitrocli')
-rw-r--r--nitrocli/CHANGELOG.md2
-rw-r--r--nitrocli/Cargo.lock4
-rw-r--r--nitrocli/Cargo.toml2
-rw-r--r--nitrocli/src/commands.rs6
-rw-r--r--nitrocli/src/pinentry.rs4
5 files changed, 9 insertions, 9 deletions
diff --git a/nitrocli/CHANGELOG.md b/nitrocli/CHANGELOG.md
index 02812e0..0204e6d 100644
--- a/nitrocli/CHANGELOG.md
+++ b/nitrocli/CHANGELOG.md
@@ -6,7 +6,7 @@ Unreleased
- Replaced `argparse` with `structopt`
- Removed the `argparse` dependency
- Made the --verbose and --model options global
-- Bumped `nitrokey` dependency to `0.5.1`
+- Bumped `nitrokey` dependency to `0.6.0`
0.3.1
diff --git a/nitrocli/Cargo.lock b/nitrocli/Cargo.lock
index 5f9eacf..550da4a 100644
--- a/nitrocli/Cargo.lock
+++ b/nitrocli/Cargo.lock
@@ -68,7 +68,7 @@ version = "0.3.1"
dependencies = [
"base32 0.4.0",
"libc 0.2.66",
- "nitrokey 0.5.1",
+ "nitrokey 0.6.0",
"nitrokey-test 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"nitrokey-test-state 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -77,7 +77,7 @@ dependencies = [
[[package]]
name = "nitrokey"
-version = "0.5.1"
+version = "0.6.0"
dependencies = [
"lazy_static 1.4.0",
"libc 0.2.66",
diff --git a/nitrocli/Cargo.toml b/nitrocli/Cargo.toml
index b69a2bb..d1d7ae2 100644
--- a/nitrocli/Cargo.toml
+++ b/nitrocli/Cargo.toml
@@ -49,7 +49,7 @@ version = "0.4.0"
version = "0.2"
[dependencies.nitrokey]
-version = "0.5.1"
+version = "0.6"
[dependencies.structopt]
version = "0.3.7"
diff --git a/nitrocli/src/commands.rs b/nitrocli/src/commands.rs
index e361509..08dad04 100644
--- a/nitrocli/src/commands.rs
+++ b/nitrocli/src/commands.rs
@@ -343,7 +343,7 @@ fn print_status(
ctx,
r#"Status:
model: {model}
- serial number: 0x{id}
+ serial number: {id}
firmware version: {fwv}
user retry count: {urc}
admin retry count: {arc}"#,
@@ -393,7 +393,7 @@ pub fn list(ctx: &mut args::ExecCtx<'_>, no_connect: bool) -> Result<()> {
.map(|m| m.to_string())
.unwrap_or_else(|| "unknown".into());
let serial_number = match device_info.serial_number {
- Some(serial_number) => format!("0x{}", serial_number),
+ Some(serial_number) => serial_number.to_string(),
None => {
// Storage devices do not have the serial number present in
// the device information. We have to connect to them to
@@ -402,7 +402,7 @@ pub fn list(ctx: &mut args::ExecCtx<'_>, no_connect: bool) -> Result<()> {
"N/A".to_string()
} else {
let device = manager.connect_path(device_info.path.clone())?;
- format!("0x{}", device.get_serial_number()?)
+ device.get_serial_number()?.to_string()
}
}
};
diff --git a/nitrocli/src/pinentry.rs b/nitrocli/src/pinentry.rs
index fd47657..af2b4dc 100644
--- a/nitrocli/src/pinentry.rs
+++ b/nitrocli/src/pinentry.rs
@@ -54,7 +54,7 @@ pub trait SecretEntry: fmt::Debug {
pub struct PinEntry {
pin_type: PinType,
model: nitrokey::Model,
- serial: String,
+ serial: nitrokey::SerialNumber,
}
impl PinEntry {
@@ -127,7 +127,7 @@ impl SecretEntry for PinEntry {
#[derive(Debug)]
pub struct PwdEntry {
model: nitrokey::Model,
- serial: String,
+ serial: nitrokey::SerialNumber,
}
impl PwdEntry {