From e57275f3d20767c90766e3369e0d0a38273fbba9 Mon Sep 17 00:00:00 2001 From: Juan Batiz-Benet Date: Fri, 19 Sep 2014 18:19:32 -0700 Subject: [PATCH] fix security comment #92 --- cmd/ipfs/init.go | 3 ++- config/config.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/ipfs/init.go b/cmd/ipfs/init.go index a94c36a4d52..8a120080dfe 100644 --- a/cmd/ipfs/init.go +++ b/cmd/ipfs/init.go @@ -83,7 +83,8 @@ func initCmd(c *commander.Command, inp []string) error { return err } - // pretend to encrypt key, then store it unencrypted + // currently storing key unencrypted. in the future we need to encrypt it. + // TODO(security) skbytes, err := sk.Bytes() if err != nil { return err diff --git a/config/config.go b/config/config.go index 69b0a5a3b27..54d461b1966 100644 --- a/config/config.go +++ b/config/config.go @@ -52,7 +52,8 @@ func (i *Identity) DecodePrivateKey(passphrase string) (crypto.PrivateKey, error return nil, err } - //pretend to actually decrypt private key + // currently storing key unencrypted. in the future we need to encrypt it. + // TODO(security) return x509.ParsePKCS1PrivateKey(pkb) }