aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-03-10 02:37:26 +0100
committerDimitri Sokolyuk <demon@dim13.org>2016-03-10 02:37:26 +0100
commit4279eebd769344024bd927743faabe080c1f402e (patch)
tree7d5399c4e33a029063314450219bd3a971922ab4
parentc30d5255fe0ddddd72193245ec0ad89608beea03 (diff)
Don't store key in account
-rw-r--r--account.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/account.go b/account.go
index fa3351b..7d17d2d 100644
--- a/account.go
+++ b/account.go
@@ -16,7 +16,6 @@ const KeySize = 2048
// Account ...
type Account struct {
- key crypto.PrivateKey
signer jose.Signer
thumb string
}
@@ -37,7 +36,7 @@ func NewAccount(privKey crypto.PrivateKey) (*Account, error) {
if err != nil {
return nil, err
}
- return &Account{key: k, signer: s, thumb: t}, nil
+ return &Account{signer: s, thumb: t}, nil
case *ecdsa.PrivateKey:
s, err := jose.NewSigner(jose.ES384, k)
if err != nil {
@@ -47,7 +46,7 @@ func NewAccount(privKey crypto.PrivateKey) (*Account, error) {
if err != nil {
return nil, err
}
- return &Account{key: k, signer: s, thumb: t}, nil
+ return &Account{signer: s, thumb: t}, nil
default:
return nil, errKeyType
}