feat: updates
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
use crate::pkiutil::bytes_to_pem;
|
||||
use crate::seutil;
|
||||
use crate::{cmdutil, seutil};
|
||||
use crate::util::base64_encode;
|
||||
use clap::{App, Arg, ArgMatches, SubCommand};
|
||||
use p256::PublicKey;
|
||||
use rust_util::util_clap::{Command, CommandError};
|
||||
use rust_util::util_msg;
|
||||
use spki::DecodePublicKey;
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
@@ -37,19 +36,17 @@ impl Command for CommandImpl {
|
||||
.long("disable-bio")
|
||||
.help("Disable bio"),
|
||||
)
|
||||
.arg(Arg::with_name("json").long("json").help("JSON output"))
|
||||
.arg(cmdutil::build_json_arg())
|
||||
}
|
||||
|
||||
fn run(&self, _arg_matches: &ArgMatches, sub_arg_matches: &ArgMatches) -> CommandError {
|
||||
let json_output = cmdutil::check_json_output(sub_arg_matches);
|
||||
|
||||
if !seutil::is_support_se() {
|
||||
return simple_error!("Secure Enclave is NOT supported.");
|
||||
}
|
||||
let ty = sub_arg_matches.value_of("type").unwrap();
|
||||
let host = sub_arg_matches.value_of("host").unwrap_or("macbook");
|
||||
let json_output = sub_arg_matches.is_present("json");
|
||||
if json_output {
|
||||
util_msg::set_logger_std_out(false);
|
||||
}
|
||||
|
||||
let sign = match ty {
|
||||
"signing" | "ecsign" | "sign" => true,
|
||||
|
||||
Reference in New Issue
Block a user