feat: v1.11.0, remove swiftc dependency
This commit is contained in:
@@ -50,8 +50,7 @@ impl Command for CommandImpl {
|
||||
let KeyUri::SecureEnclaveKey(se_key_uri) = parse_key_uri(key)?;
|
||||
debugging!("Secure enclave key URI: {:?}", se_key_uri);
|
||||
|
||||
let ephemeral_public_key_der_bytes;
|
||||
if epk.starts_with("04") {
|
||||
let ephemeral_public_key_der_bytes = if epk.starts_with("04") {
|
||||
let ephemeral_public_key_point_bytes = opt_result!(
|
||||
hex::decode(epk),
|
||||
"Decode public key point from hex failed: {}"
|
||||
@@ -65,11 +64,10 @@ impl Command for CommandImpl {
|
||||
return simple_error!("Parse public key failed.");
|
||||
}
|
||||
let public_key = public_key_opt.unwrap();
|
||||
ephemeral_public_key_der_bytes = public_key.to_public_key_der()?.as_bytes().to_vec();
|
||||
public_key.to_public_key_der()?.as_bytes().to_vec()
|
||||
} else {
|
||||
ephemeral_public_key_der_bytes =
|
||||
opt_result!(hex::decode(epk), "Decode public key from hex failed: {}");
|
||||
}
|
||||
opt_result!(hex::decode(epk), "Decode public key from hex failed: {}")
|
||||
};
|
||||
|
||||
let dh = seutil::secure_enclave_p256_dh(
|
||||
&se_key_uri.private_key,
|
||||
|
||||
Reference in New Issue
Block a user