@cryptotaxi247 / kubo / commits / 4a7373bc6

keystore: create new keys with 0400 permissions (as spec'ed)

Spec is pretty much out of date but specifies this. https://github.com/ipfs/specs/blob/master/KEYSTORE.md

Hector Sanjuan committed Mar 27, 2020 at 12:59 UTC 4a7373bc6ac04cc552023d99b9a0c03bd2d677ab
1 file changed +1 -1
keystore/keystore.go
+1 -1
@@ -88,7 +88,7 @@ func (ks *FSKeystore) Put(name string, k ci.PrivKey) error {
88
89 kp := filepath.Join(ks.dir, name)
90
91 - fi, err := os.OpenFile(kp, os.O_CREATE|os.O_EXCL|os.O_WRONLY, 0600)
91 + fi, err := os.OpenFile(kp, os.O_CREATE|os.O_EXCL|os.O_WRONLY, 0400)
92 if err != nil {
93 if os.IsExist(err) {
94 err = ErrKeyExists