feat: v1.11.3

This commit is contained in:
2025-03-24 23:25:31 +08:00
parent d04038ccd9
commit 8aeb47c66f
2 changed files with 13 additions and 4 deletions

View File

@@ -7,11 +7,14 @@ pub fn is_support_se() -> bool {
swift_secure_enclave_tool_rs::is_secure_enclave_supported().unwrap_or(false)
}
pub fn generate_secure_enclave_p256_keypair(sign: bool) -> XResult<(Vec<u8>, Vec<u8>, String)> {
pub fn generate_secure_enclave_p256_keypair(
sign: bool,
require_bio: bool,
) -> XResult<(Vec<u8>, Vec<u8>, String)> {
let key_material = if sign {
swift_secure_enclave_tool_rs::generate_keypair(KeyPurpose::Signing, true)?
swift_secure_enclave_tool_rs::generate_keypair(KeyPurpose::Signing, require_bio)?
} else {
swift_secure_enclave_tool_rs::generate_keypair(KeyPurpose::KeyAgreement, true)?
swift_secure_enclave_tool_rs::generate_keypair(KeyPurpose::KeyAgreement, require_bio)?
};
Ok((
key_material.public_key_point,