aboutsummaryrefslogtreecommitdiffstats
path: root/swarm
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-05-23 19:58:03 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-05-23 19:58:03 +0800
commitaa73420207cba02a68befdbb8667f1e6ceed3f4d (patch)
tree76b4fb7ffc9440e7ff27b22dc367355d4fc84f5c /swarm
parent3556962053267def82f1a9f9e97a26f7b7c1450e (diff)
downloadgo-tangerine-aa73420207cba02a68befdbb8667f1e6ceed3f4d.tar
go-tangerine-aa73420207cba02a68befdbb8667f1e6ceed3f4d.tar.gz
go-tangerine-aa73420207cba02a68befdbb8667f1e6ceed3f4d.tar.bz2
go-tangerine-aa73420207cba02a68befdbb8667f1e6ceed3f4d.tar.lz
go-tangerine-aa73420207cba02a68befdbb8667f1e6ceed3f4d.tar.xz
go-tangerine-aa73420207cba02a68befdbb8667f1e6ceed3f4d.tar.zst
go-tangerine-aa73420207cba02a68befdbb8667f1e6ceed3f4d.zip
accounts/keystore, crypto: enforce 256 bit keys on import
Diffstat (limited to 'swarm')
-rw-r--r--swarm/api/config_test.go5
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)