Skip to content

Commit

Permalink
resolve error result always true
Browse files Browse the repository at this point in the history
  • Loading branch information
Nilay27 committed Aug 14, 2023
1 parent 097b7b2 commit 834578f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/executor/crypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,11 @@ fn check_p256_signature(engine: &mut Engine, name: &'static str, hash: bool) ->
#[cfg(feature = "signature_no_check")]
let result = engine.modifiers.chksig_always_succeed || signature.verify(&md, &pub_key).is_ok();
#[cfg(not(feature = "signature_no_check"))]
let result = signature.verify(&md, &pub_key).is_ok();
let result = match signature.verify(&md, &pub_key) {
Ok(true) => true,
Ok(false) => false,
Err(_) => false,
};
engine.cc.stack.push(boolean!(result));
Ok(())
}
Expand Down

0 comments on commit 834578f

Please sign in to comment.