feat: updates
This commit is contained in:
@@ -37,9 +37,7 @@ impl Command for CommandImpl {
|
||||
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.");
|
||||
}
|
||||
seutil::check_se_supported()?;
|
||||
let key = sub_arg_matches.value_of("key").unwrap();
|
||||
let epk = sub_arg_matches.value_of("epk").unwrap();
|
||||
|
||||
|
||||
@@ -41,9 +41,7 @@ impl Command for CommandImpl {
|
||||
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.");
|
||||
}
|
||||
seutil::check_se_supported()?;
|
||||
let key = sub_arg_matches.value_of("key").unwrap();
|
||||
let input_bytes = match sub_arg_matches.value_of("input") {
|
||||
None => match sub_arg_matches.value_of("input-base64") {
|
||||
|
||||
@@ -42,9 +42,7 @@ impl Command for CommandImpl {
|
||||
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.");
|
||||
}
|
||||
seutil::check_se_supported()?;
|
||||
let ty = sub_arg_matches.value_of("type").unwrap();
|
||||
let host = sub_arg_matches.value_of("host").unwrap_or("macbook");
|
||||
|
||||
|
||||
@@ -10,6 +10,14 @@ pub fn is_support_se() -> bool {
|
||||
})
|
||||
}
|
||||
|
||||
pub fn check_se_supported() -> XResult<()> {
|
||||
if !is_support_se() {
|
||||
simple_error!("Secure Enclave is NOT supported.")
|
||||
} else {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
pub fn generate_secure_enclave_p256_keypair(
|
||||
sign: bool,
|
||||
require_bio: bool,
|
||||
|
||||
Reference in New Issue
Block a user