Skip to content

Commit

Permalink
refactor(keys): avoid der-conversion when validating signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
jns-ps committed Dec 19, 2024
1 parent 048b2c7 commit a594f50
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/keys/src/verifying_keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ impl VerifyingKey {
let mut digest = sha2::Sha256::new();
digest.update(message);

let der_sig = signature.to_der();
vk.verify_digest(digest, &der_sig)
vk.verify_digest(digest, signature)
.map_err(|e| anyhow!("Failed to verify signature: {}", e))
}
}
Expand Down

0 comments on commit a594f50

Please sign in to comment.