mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-20 02:21:48 +08:00
fix security comment #92
This commit is contained in:

committed by
Brian Tiger Chow

parent
aa29603923
commit
d17fcc1780
@ -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
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user