mirror of
https://github.com/FiloSottile/mkcert.git
synced 2025-10-13 16:31:41 +08:00
Make private keys writeable
Read-only is too much hassle for expendable dev keys
This commit is contained in:
2
cert.go
2
cert.go
@@ -67,7 +67,7 @@ func (m *mkcert) makeCert(hosts []string) {
|
||||
privDER, err := x509.MarshalPKCS8PrivateKey(priv)
|
||||
fatalIfErr(err, "failed to encode certificate key")
|
||||
err = ioutil.WriteFile(filename+"-key.pem", pem.EncodeToMemory(
|
||||
&pem.Block{Type: "PRIVATE KEY", Bytes: privDER}), 0400)
|
||||
&pem.Block{Type: "PRIVATE KEY", Bytes: privDER}), 0600)
|
||||
fatalIfErr(err, "failed to save certificate key")
|
||||
|
||||
err = ioutil.WriteFile(filename+".pem", pem.EncodeToMemory(
|
||||
|
Reference in New Issue
Block a user