Skip to content

Commit

Permalink
Revert "Review: check if the target key is symmetric before use"
Browse files Browse the repository at this point in the history
This reverts commit fdc90f3.

This is required to make Nitrokey Webcrypt working at the moment, but should be removed in the future.
  • Loading branch information
szszszsz authored and robin-nitrokey committed Nov 29, 2023
1 parent 725992c commit a16f8dc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/hmacsha256p256/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use trussed::{
types::{Bytes, CoreContext, KeyId, Location, Mechanism},
Error,
};
use trussed::key::Kind::Symmetric;

#[derive(Debug, Default)]
pub struct HmacSha256P256Extension;
Expand Down Expand Up @@ -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 =
Expand Down

0 comments on commit a16f8dc

Please sign in to comment.