Use local secp256k1 callbacks in kotlin native code

This commit is contained in:
sstone
2023-12-12 12:08:13 +01:00
parent aadffabe42
commit 0364ec762e
3 changed files with 185 additions and 144 deletions

View File

@@ -276,7 +276,8 @@ class Secp256k1Test {
val pub1 = Secp256k1.ecdsaRecover(sig, message, 1)
assertTrue(pub.contentEquals(pub0) || pub.contentEquals(pub1))
assertFails {
// this is a special case, ecdsaRecover explicitly does not check that recid is valid, which triggers our illegal callback handler
assertFailsWith(Secp256k1IllegalCallbackException::class) {
Secp256k1.ecdsaRecover(sig, message, 4)
}
}