update fuzzdummy API to match normal API
This commit is contained in:
parent
f3d48a298e
commit
d06dd2023b
|
@ -982,6 +982,7 @@ mod fuzz_dummy {
|
||||||
cx: *const Context,
|
cx: *const Context,
|
||||||
sig64: *const c_uchar,
|
sig64: *const c_uchar,
|
||||||
msg32: *const c_uchar,
|
msg32: *const c_uchar,
|
||||||
|
msglen: size_t,
|
||||||
pubkey: *const XOnlyPublicKey,
|
pubkey: *const XOnlyPublicKey,
|
||||||
) -> c_int {
|
) -> c_int {
|
||||||
check_context_flags(cx, SECP256K1_START_VERIFY);
|
check_context_flags(cx, SECP256K1_START_VERIFY);
|
||||||
|
@ -990,7 +991,7 @@ mod fuzz_dummy {
|
||||||
let _ = secp256k1_xonly_pubkey_tweak_add(cx, &mut new_pk, pubkey, msg32);
|
let _ = secp256k1_xonly_pubkey_tweak_add(cx, &mut new_pk, pubkey, msg32);
|
||||||
// Actually verify
|
// Actually verify
|
||||||
let sig_sl = slice::from_raw_parts(sig64 as *const u8, 64);
|
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] {
|
if &sig_sl[..32] == msg_sl && sig_sl[32..] == (*pubkey).0[..32] {
|
||||||
1
|
1
|
||||||
} else {
|
} else {
|
||||||
|
@ -1004,8 +1005,7 @@ mod fuzz_dummy {
|
||||||
sig64: *mut c_uchar,
|
sig64: *mut c_uchar,
|
||||||
msg32: *const c_uchar,
|
msg32: *const c_uchar,
|
||||||
keypair: *const KeyPair,
|
keypair: *const KeyPair,
|
||||||
_noncefp: SchnorrNonceFn,
|
_aux_rand32: *const c_uchar
|
||||||
_noncedata: *const c_void
|
|
||||||
) -> c_int {
|
) -> c_int {
|
||||||
check_context_flags(cx, SECP256K1_START_SIGN);
|
check_context_flags(cx, SECP256K1_START_SIGN);
|
||||||
// Check context is built for signing
|
// Check context is built for signing
|
||||||
|
|
Loading…
Reference in New Issue