diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-02-16 21:20:54 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-02-16 21:20:54 +0800 |
commit | 202362d9258335c695eb75f55f4be74a50a1af33 (patch) | |
tree | 918c4390162d27df67fb2241a25084020686392b /crypto | |
parent | 393267489cca8448e6c7e1bfe9965d7a1aab821a (diff) | |
parent | 164de5e22be39ba2bdc58f84f72572252634e7e1 (diff) | |
download | dexon-202362d9258335c695eb75f55f4be74a50a1af33.tar dexon-202362d9258335c695eb75f55f4be74a50a1af33.tar.gz dexon-202362d9258335c695eb75f55f4be74a50a1af33.tar.bz2 dexon-202362d9258335c695eb75f55f4be74a50a1af33.tar.lz dexon-202362d9258335c695eb75f55f4be74a50a1af33.tar.xz dexon-202362d9258335c695eb75f55f4be74a50a1af33.tar.zst dexon-202362d9258335c695eb75f55f4be74a50a1af33.zip |
Merge branch 'develop' of github.com:ethereum/go-ethereum into develop
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/secp256k1/secp256_test.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/crypto/secp256k1/secp256_test.go b/crypto/secp256k1/secp256_test.go index 5e657cd72..3599fde38 100644 --- a/crypto/secp256k1/secp256_test.go +++ b/crypto/secp256k1/secp256_test.go @@ -3,9 +3,10 @@ package secp256k1 import ( "bytes" "fmt" - "github.com/ethereum/go-ethereum/crypto/randentropy" "log" "testing" + + "github.com/ethereum/go-ethereum/crypto/randentropy" ) const TESTS = 10000 // how many tests @@ -227,3 +228,11 @@ func Test_Secp256_06b(t *testing.T) { fmt.Printf("ERROR: Accepted signature for %v of %v random messages\n", fail_count, TESTS) } } + +func TestInvalidKey(t *testing.T) { + p1 := make([]byte, 32) + err := VerifySeckeyValidity(p1) + if err == nil { + t.Errorf("pvk %x varify sec key should have returned error", p1) + } +} |