aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/key_store_passphrase.go
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/key_store_passphrase.go')
-rw-r--r--crypto/key_store_passphrase.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/crypto/key_store_passphrase.go b/crypto/key_store_passphrase.go
index c7f740ae3..68135a4f0 100644
--- a/crypto/key_store_passphrase.go
+++ b/crypto/key_store_passphrase.go
@@ -89,8 +89,9 @@ type keyStorePassphrase struct {
}
func NewKeyStorePassphrase(path string) KeyStore2 {
- ks := new(keyStorePassphrase)
- ks.keysDirPath = path
+ ks := &keyStorePassphrase{
+ keysDirPath : path,
+ }
return ks
}
@@ -103,9 +104,10 @@ func (ks keyStorePassphrase) GetKey(keyId *uuid.UUID, auth string) (key *Key, er
if err != nil {
return nil, err
}
- key = new(Key)
- key.Id = keyId
- key.PrivateKey = ToECDSA(keyBytes)
+ key = &Key{
+ Id : keyId,
+ PrivateKey : ToECDSA(keyBytes),
+ }
return key, err
}