core/test: ensure public key is invalid in test

When providing public key as a subslice, it still can be
decoded as a valid key, thus interop will not return an error
but rather push `false` on stack. This test is about providing
invalid key, so ensure this via setting invalid prefix.
This commit is contained in:
Evgenii Stratonikov 2020-07-25 11:50:03 +03:00
parent 76fdbea331
commit 83e53fab24

View file

@ -210,7 +210,7 @@ func TestECDSAVerify(t *testing.T) {
t.Run("invalid public key", func(t *testing.T) {
sign := priv.Sign(msg)
pub := priv.PublicKey().Bytes()
pub = pub[10:]
pub[0] = 0xFF // invalid prefix
runCase(t, true, false, sign, pub, msg)
})
}