mirror of
https://github.com/trussed-dev/trussed-staging.git
synced 2026-06-20 04:16:23 -07:00
Revert "Review: check if the target key is symmetric before use"
This reverts commit fdc90f35afa2db6be59969a5f1e49ca27ff9900a. This is required to make Nitrokey Webcrypt working at the moment, but should be removed in the future.
This commit is contained in:
@@ -11,7 +11,6 @@ use trussed::{
|
||||
types::{Bytes, CoreContext, KeyId, Location, Mechanism},
|
||||
Error,
|
||||
};
|
||||
use trussed::key::Kind::Symmetric;
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub struct HmacSha256P256Extension;
|
||||
@@ -148,7 +147,7 @@ pub fn derive_key_from_hash(
|
||||
type HmacSha256P256 = Hmac<sha2::Sha256>;
|
||||
|
||||
let key_id = request.key;
|
||||
let key = keystore.load_key(key::Secrecy::Secret, Some(Symmetric(32)), &key_id)?;
|
||||
let key = keystore.load_key(key::Secrecy::Secret, None, &key_id)?;
|
||||
let shared_secret = key.material;
|
||||
|
||||
let mut mac =
|
||||
|
||||
Reference in New Issue
Block a user