Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax key kind check in derive_key for hmacsha256 #58

Merged
merged 1 commit into from Dec 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/mechanisms/hmacsha256.rs
Expand Up @@ -16,7 +16,9 @@ impl DeriveKey for super::HmacSha256 {
let key_id = request.base_key;
let key = keystore.load_key(key::Secrecy::Secret, None, &key_id)?;
if !matches!(key.kind, key::Kind::Symmetric(..) | key::Kind::Shared(..)) {
return Err(Error::WrongKeyKind);
// We have to disable this check for compatibility with fido-authenticator, see:
// https://github.com/solokeys/fido-authenticator/issues/21
warn!("derive_key for hmacsha256 called with invalid key kind ({:?})", key.kind);
}
let shared_secret = key.material;

Expand Down