aboutsummaryrefslogtreecommitdiff
path: root/modules/setting
diff options
context:
space:
mode:
authorspacetourist <guy.callum@gmail.com>2017-02-10 19:04:43 +0000
committer无闻 <u@gogs.io>2017-02-10 14:04:43 -0500
commit29722af1ae51333a7da742b5e02a5e7fe5983aab (patch)
tree281d103accaa2ff9c6321e101307a641d8d8d33d /modules/setting
parent563fc7c6d7d685678f86ba13e565bafa96f005e0 (diff)
Configurable SSH cipher suite (#4109)
* Configurable SSH cipher suite * Maintain ordering
Diffstat (limited to 'modules/setting')
-rw-r--r--modules/setting/setting.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index b5c6d9c9..4db8dbff 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -85,6 +85,7 @@ var (
ListenHost string `ini:"SSH_LISTEN_HOST"`
ListenPort int `ini:"SSH_LISTEN_PORT"`
RootPath string `ini:"SSH_ROOT_PATH"`
+ ServerCiphers []string `ini:"SSH_SERVER_CIPHERS"`
KeyTestPath string `ini:"SSH_KEY_TEST_PATH"`
KeygenPath string `ini:"SSH_KEYGEN_PATH"`
MinimumKeySizeCheck bool `ini:"-"`
@@ -425,6 +426,7 @@ func NewContext() {
}
SSH.RootPath = path.Join(homeDir, ".ssh")
+ SSH.ServerCiphers = sec.Key("SSH_SERVER_CIPHERS").Strings(",")
SSH.KeyTestPath = os.TempDir()
if err = Cfg.Section("server").MapTo(&SSH); err != nil {
log.Fatal(4, "Fail to map SSH settings: %v", err)