From a16f8dc1288d64e82dd4ab9f876962a557d28b52 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Thu, 29 Jun 2023 13:01:31 +0200 Subject: [PATCH] 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. --- src/hmacsha256p256/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/hmacsha256p256/mod.rs b/src/hmacsha256p256/mod.rs index 0459d44..f3668de 100644 --- a/src/hmacsha256p256/mod.rs +++ b/src/hmacsha256p256/mod.rs @@ -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; 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 =