forked from External/grumble
Refine auto-keypair regen functionality. Complain loudly if only one of (cert.pem, key.pem) exists.
This commit is contained in:
parent
76747e0b71
commit
b94b04d2de
4 changed files with 67 additions and 42 deletions
|
|
@ -55,7 +55,7 @@ func GenerateSelfSignedCert(certpath, keypath string) (err error) {
|
|||
Bytes: keybuf,
|
||||
}
|
||||
|
||||
certfn := filepath.Join(Args.DataDir, "cert")
|
||||
certfn := filepath.Join(Args.DataDir, "cert.pem")
|
||||
file, err := os.OpenFile(certfn, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0700)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
@ -66,7 +66,7 @@ func GenerateSelfSignedCert(certpath, keypath string) (err error) {
|
|||
return err
|
||||
}
|
||||
|
||||
keyfn := filepath.Join(Args.DataDir, "key")
|
||||
keyfn := filepath.Join(Args.DataDir, "key.pem")
|
||||
file, err = os.OpenFile(keyfn, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0700)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue