Skip to content

Commit

Permalink
update fuzzdummy API to match normal API
Browse files Browse the repository at this point in the history
  • Loading branch information
apoelstra committed Feb 21, 2022
1 parent efbf256 commit a7bb5fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions secp256k1-sys/src/lib.rs
Expand Up @@ -982,6 +982,7 @@ mod fuzz_dummy {
cx: *const Context,
sig64: *const c_uchar,
msg32: *const c_uchar,
msglen: size_t,
pubkey: *const XOnlyPublicKey,
) -> c_int {
check_context_flags(cx, SECP256K1_START_VERIFY);
Expand All @@ -990,7 +991,7 @@ mod fuzz_dummy {
let _ = secp256k1_xonly_pubkey_tweak_add(cx, &mut new_pk, pubkey, msg32);
// Actually verify
let sig_sl = slice::from_raw_parts(sig64 as *const u8, 64);
let msg_sl = slice::from_raw_parts(msg32 as *const u8, 32);
let msg_sl = slice::from_raw_parts(msg32 as *const u8, msglen);
if &sig_sl[..32] == msg_sl && sig_sl[32..] == (*pubkey).0[..32] {
1
} else {
Expand All @@ -1004,8 +1005,7 @@ mod fuzz_dummy {
sig64: *mut c_uchar,
msg32: *const c_uchar,
keypair: *const KeyPair,
_noncefp: SchnorrNonceFn,
_noncedata: *const c_void
_aux_rand32: *const c_uchar
) -> c_int {
check_context_flags(cx, SECP256K1_START_SIGN);
// Check context is built for signing
Expand Down

0 comments on commit a7bb5fb

Please sign in to comment.