Skip to content

Commit

Permalink
Fix Multikey algorithm selection.
Browse files Browse the repository at this point in the history
  • Loading branch information
timothee-haudebourg committed Jun 25, 2024
1 parent 8e5eb86 commit ddcf958
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/verification-methods/src/methods/w3c/multikey.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ impl Multikey {
let algorithm = self
.public_key
.decoded
.algorithm
.get_algorithm()
.ok_or(MessageSignatureError::MissingAlgorithm)?;
let key_algorithm = secret_key.algorithm.unwrap_or(algorithm);
let key_algorithm = secret_key.get_algorithm().unwrap_or(algorithm);
if !algorithm.is_compatible_with(key_algorithm) {
return Err(MessageSignatureError::InvalidSecretKey);
}
Expand All @@ -108,7 +108,7 @@ impl Multikey {
let algorithm = self
.public_key
.decoded
.algorithm
.get_algorithm()
.ok_or(ProofValidationError::MissingAlgorithm)?;
Ok(ssi_jws::verify_bytes(
algorithm,
Expand Down

0 comments on commit ddcf958

Please sign in to comment.