feat: v1.10.9, add se supprot
This commit is contained in:
25
src/cmd_se.rs
Normal file
25
src/cmd_se.rs
Normal file
@@ -0,0 +1,25 @@
|
||||
use crate::seutil;
|
||||
use clap::{App, ArgMatches, SubCommand};
|
||||
use rust_util::util_clap::{Command, CommandError};
|
||||
|
||||
pub struct CommandImpl;
|
||||
|
||||
impl Command for CommandImpl {
|
||||
fn name(&self) -> &str {
|
||||
"se"
|
||||
}
|
||||
|
||||
fn subcommand<'a>(&self) -> App<'a, 'a> {
|
||||
SubCommand::with_name(self.name()).about("Secure Enclave subcommand")
|
||||
// .arg(Arg::with_name("json").long("json").help("JSON output"))
|
||||
}
|
||||
|
||||
fn run(&self, _arg_matches: &ArgMatches, _sub_arg_matches: &ArgMatches) -> CommandError {
|
||||
if seutil::is_support_se() {
|
||||
success!("Secure Enclave is supported.")
|
||||
} else {
|
||||
failure!("Secure Enclave is NOT supported.")
|
||||
}
|
||||
Ok(None)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user