feat: v1.10.16
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -487,7 +487,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "card-cli"
|
||||
version = "1.10.15"
|
||||
version = "1.10.16"
|
||||
dependencies = [
|
||||
"authenticator 0.3.1",
|
||||
"base64 0.21.7",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "card-cli"
|
||||
version = "1.10.15"
|
||||
version = "1.10.16"
|
||||
authors = ["Hatter Jiang <jht5945@gmail.com>"]
|
||||
edition = "2018"
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ use clap::{App, Arg, ArgMatches, SubCommand};
|
||||
use der_parser::ber::BerObjectContent;
|
||||
use pem::Pem;
|
||||
use rust_util::util_clap::{Command, CommandError};
|
||||
use rust_util::util_msg;
|
||||
use yubikey::{Key, YubiKey};
|
||||
use yubikey::piv::{AlgorithmId, sign_data};
|
||||
|
||||
@@ -25,6 +26,8 @@ impl Command for CommandImpl {
|
||||
}
|
||||
|
||||
fn run(&self, _arg_matches: &ArgMatches, sub_arg_matches: &ArgMatches) -> CommandError {
|
||||
util_msg::set_logger_std_out(false);
|
||||
|
||||
let namespace_opt = sub_arg_matches.value_of("namespace");
|
||||
let namespace = match namespace_opt {
|
||||
None => return simple_error!("Namespace required"),
|
||||
|
||||
@@ -6,6 +6,7 @@ use base64::engine::general_purpose::STANDARD;
|
||||
use base64::Engine;
|
||||
use clap::{App, Arg, ArgMatches, SubCommand};
|
||||
use rust_util::util_clap::{Command, CommandError};
|
||||
use rust_util::util_msg;
|
||||
use yubikey::piv::AlgorithmId;
|
||||
use yubikey::{Key, YubiKey};
|
||||
|
||||
@@ -21,6 +22,8 @@ impl Command for CommandImpl {
|
||||
}
|
||||
|
||||
fn run(&self, _arg_matches: &ArgMatches, sub_arg_matches: &ArgMatches) -> CommandError {
|
||||
util_msg::set_logger_std_out(false);
|
||||
|
||||
let slot = opt_value_result!(sub_arg_matches.value_of("slot"), "--slot must assigned, e.g. 82, 83 ... 95, 9a, 9c, 9d, 9e");
|
||||
let ca = sub_arg_matches.is_present("ca");
|
||||
let mut yk = opt_result!(YubiKey::open(), "YubiKey not found: {}");
|
||||
@@ -81,7 +84,7 @@ impl Command for CommandImpl {
|
||||
let ssh_pub_key_sha256 = sha256_bytes(&ssh_pub_key);
|
||||
information!("SSH key SHA256: {} (base64)", STANDARD.encode(&ssh_pub_key_sha256));
|
||||
information!("SSH key SHA256: {} (hex)", hex::encode(&ssh_pub_key_sha256));
|
||||
println!();
|
||||
eprintln!();
|
||||
|
||||
println!(
|
||||
"{}ecdsa-sha2-{} {} Yubikey-PIV-{}",
|
||||
|
||||
Reference in New Issue
Block a user