mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-09 03:13:13 +00:00
keys: don't panic if signature has invalid size
This commit is contained in:
parent
9733a6f394
commit
0a596e1df2
2 changed files with 4 additions and 1 deletions
|
@ -52,6 +52,9 @@ func TestPubKeyVerify(t *testing.T) {
|
|||
expected := true
|
||||
assert.Equal(t, expected, result)
|
||||
|
||||
// Small signature, no panic.
|
||||
assert.False(t, pubKey.Verify([]byte{1, 2, 3}, hashedData.BytesBE()))
|
||||
|
||||
pubKey = &PublicKey{}
|
||||
assert.False(t, pubKey.Verify(signedData, hashedData.BytesBE()))
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue