From d17fcc1780b5a556d7096852cb7341566e96ff6e Mon Sep 17 00:00:00 2001
From: Juan Batiz-Benet <juan@benet.ai>
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 a94c36a4..8a120080 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 69b0a5a3..54d461b1 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)
 }
 
-- 
GitLab