From 83e53fab247119c0823b2d087bbb9c93b358ab77 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Sat, 25 Jul 2020 11:50:03 +0300 Subject: [PATCH] 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. --- pkg/core/interop_neo_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/core/interop_neo_test.go b/pkg/core/interop_neo_test.go index 2336fed8a..525b04942 100644 --- a/pkg/core/interop_neo_test.go +++ b/pkg/core/interop_neo_test.go @@ -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) }) }