Skip to content

Commit fb44225

Browse files
committed
valgrind_ctime_test: Add schnorrsig_sign
1 parent e2d6f21 commit fb44225

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/valgrind_ctime_test.c

+14
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
# include "include/secp256k1_extrakeys.h"
2222
#endif
2323

24+
#if ENABLE_MODULE_SCHNORRSIG
25+
#include "include/secp256k1_schnorrsig.h"
26+
#endif
27+
2428
int main(void) {
2529
secp256k1_context* ctx;
2630
secp256k1_ecdsa_signature signature;
@@ -138,6 +142,16 @@ int main(void) {
138142
CHECK(ret == 1);
139143
#endif
140144

145+
#if ENABLE_MODULE_SCHNORRSIG
146+
VALGRIND_MAKE_MEM_UNDEFINED(key, 32);
147+
ret = secp256k1_keypair_create(ctx, &keypair, key);
148+
VALGRIND_MAKE_MEM_DEFINED(&ret, sizeof(ret));
149+
CHECK(ret == 1);
150+
ret = secp256k1_schnorrsig_sign(ctx, sig, msg, &keypair, NULL, NULL);
151+
VALGRIND_MAKE_MEM_DEFINED(&ret, sizeof(ret));
152+
CHECK(ret == 1);
153+
#endif
154+
141155
secp256k1_context_destroy(ctx);
142156
return 0;
143157
}

0 commit comments

Comments
 (0)