Skip to content

Commit ccb23e3

Browse files
committed
valgrind_ctime_test: Add schnorrsig_sign
1 parent 682a113 commit ccb23e3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/valgrind_ctime_test.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
# include "include/secp256k1_extrakeys.h"
1717
#endif
1818

19+
#if ENABLE_MODULE_SCHNORRSIG
20+
#include "include/secp256k1_schnorrsig.h"
21+
#endif
22+
1923
int main(void) {
2024
secp256k1_context* ctx;
2125
secp256k1_ecdsa_signature signature;
@@ -118,6 +122,14 @@ int main(void) {
118122
CHECK(ret == 1);
119123
#endif
120124

125+
#if ENABLE_MODULE_SCHNORRSIG
126+
VALGRIND_MAKE_MEM_UNDEFINED(key, 32);
127+
ret = secp256k1_keypair_create(ctx, &keypair, key);
128+
ret = secp256k1_schnorrsig_sign(ctx, sig, msg, &keypair, NULL, NULL);
129+
VALGRIND_MAKE_MEM_DEFINED(&ret, sizeof(ret));
130+
CHECK(ret == 1);
131+
#endif
132+
121133
secp256k1_context_destroy(ctx);
122134
return 0;
123135
}

0 commit comments

Comments
 (0)