diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-05-23 19:58:03 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-05-23 19:58:03 +0800 |
commit | aa73420207cba02a68befdbb8667f1e6ceed3f4d (patch) | |
tree | 76b4fb7ffc9440e7ff27b22dc367355d4fc84f5c /swarm | |
parent | 3556962053267def82f1a9f9e97a26f7b7c1450e (diff) | |
download | dexon-aa73420207cba02a68befdbb8667f1e6ceed3f4d.tar.gz dexon-aa73420207cba02a68befdbb8667f1e6ceed3f4d.tar.zst dexon-aa73420207cba02a68befdbb8667f1e6ceed3f4d.zip |
accounts/keystore, crypto: enforce 256 bit keys on import
Diffstat (limited to 'swarm')
-rw-r--r-- | swarm/api/config_test.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/swarm/api/config_test.go b/swarm/api/config_test.go index 6b5cea915..85d056270 100644 --- a/swarm/api/config_test.go +++ b/swarm/api/config_test.go @@ -96,7 +96,10 @@ func TestConfigWriteRead(t *testing.T) { } defer os.RemoveAll(tmp) - prvkey := crypto.ToECDSA(common.Hex2Bytes(hexprvkey)) + prvkey, err := crypto.HexToECDSA(hexprvkey) + if err != nil { + t.Fatalf("failed to load private key: %v", err) + } orig, err := NewConfig(tmp, common.Address{}, prvkey, 323) if err != nil { t.Fatalf("expected no error, got %v", err) |