signatureNormalize: relax check on signature size
Checking that the sig size is >= 64 is enough, this is just a quick check before the actual library method is called.
This commit is contained in:
parent
7272a55b8a
commit
6a67dbe9f6
@ -79,7 +79,7 @@ public object Secp256k1Native : Secp256k1 {
|
||||
}
|
||||
|
||||
public override fun signatureNormalize(sig: ByteArray): Pair<ByteArray, Boolean> {
|
||||
require(sig.size == 64 || sig.size in 70..73)
|
||||
require(sig.size >= 64){ "invalid signature ${Hex.encode(sig)}" }
|
||||
memScoped {
|
||||
val nSig = allocSignature(sig)
|
||||
val isHighS = secp256k1_ecdsa_signature_normalize(ctx, nSig.ptr, nSig.ptr)
|
||||
|
Loading…
x
Reference in New Issue
Block a user