feat: v1.12.2
This commit is contained in:
@@ -6,10 +6,10 @@ use rust_util::util_clap::{Command, CommandError};
|
||||
use rust_util::util_msg;
|
||||
use rust_util::util_msg::MessageType;
|
||||
use x509_parser::parse_x509_certificate;
|
||||
use yubikey::{Key, YubiKey};
|
||||
use yubikey::Key;
|
||||
use yubikey::piv::{AlgorithmId, metadata};
|
||||
|
||||
use crate::{cmdutil, pivutil, util};
|
||||
use crate::{cmdutil, pivutil, util, yubikeyutil};
|
||||
use crate::keyutil::{KeyUri, YubikeyPivKey};
|
||||
use crate::pivutil::{get_algorithm_id_by_certificate, slot_equals, ToStr};
|
||||
use crate::pkiutil::bytes_to_pem;
|
||||
@@ -25,6 +25,7 @@ impl Command for CommandImpl {
|
||||
SubCommand::with_name(self.name()).about("PIV meta subcommand")
|
||||
.arg(cmdutil::build_slot_arg())
|
||||
.arg(cmdutil::build_json_arg())
|
||||
.arg(cmdutil::build_serial_arg())
|
||||
}
|
||||
|
||||
fn run(&self, _arg_matches: &ArgMatches, sub_arg_matches: &ArgMatches) -> CommandError {
|
||||
@@ -34,7 +35,7 @@ impl Command for CommandImpl {
|
||||
|
||||
let slot = opt_value_result!(sub_arg_matches.value_of("slot"), "--slot must assigned, e.g. 82, 83 ... 95, 9a, 9c, 9d, 9e");
|
||||
|
||||
let mut yk = opt_result!(YubiKey::open(), "YubiKey not found: {}");
|
||||
let mut yk = yubikeyutil::open_yubikey_with_args(sub_arg_matches)?;
|
||||
|
||||
let slot_id = pivutil::get_slot_id(slot)?;
|
||||
json.insert("slot", pivutil::to_slot_hex(&slot_id));
|
||||
|
||||
Reference in New Issue
Block a user