diff options
author | Unknwon <u@gogs.io> | 2018-12-19 08:31:22 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2018-12-19 08:31:22 -0500 |
commit | e70e72e025db44bc7f27d10ffcb716300101cb5c (patch) | |
tree | a5871d418ddf1891bb1572d6e8d0072b662c0a6a /pkg/ssh | |
parent | e2ce6a0dab93358fa91f473e0e4cfe025ee4ec28 (diff) |
pkg/ssh: specify ssh-keygen to always generate PEM format
Diffstat (limited to 'pkg/ssh')
-rw-r--r-- | pkg/ssh/ssh.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/ssh/ssh.go b/pkg/ssh/ssh.go index 41f1b975..a8cefabb 100644 --- a/pkg/ssh/ssh.go +++ b/pkg/ssh/ssh.go @@ -166,7 +166,7 @@ func Listen(host string, port int, ciphers []string) { keyPath := filepath.Join(setting.AppDataPath, "ssh/gogs.rsa") if !com.IsExist(keyPath) { os.MkdirAll(filepath.Dir(keyPath), os.ModePerm) - _, stderr, err := com.ExecCmd(setting.SSH.KeygenPath, "-f", keyPath, "-t", "rsa", "-N", "") + _, stderr, err := com.ExecCmd(setting.SSH.KeygenPath, "-f", keyPath, "-t", "rsa", "-m", "PEM", "-N", "") if err != nil { panic(fmt.Sprintf("Fail to generate private key: %v - %s", err, stderr)) } |