summaryrefslogtreecommitdiffstats
path: root/modules/setting/setting.go
diff options
context:
space:
mode:
authorspacetourist <guy.callum@gmail.com>2017-10-21 14:13:41 +0100
committerLauris BH <lauris@nix.lv>2017-10-21 16:13:41 +0300
commit7131c7d40d4f5bd32b16031e884153548eee133f (patch)
tree99fa77ac1d785be873ddb0c955f6eeab828baaee /modules/setting/setting.go
parent985a39590ba07798dd6e6097e0c10401764c27fb (diff)
downloadgitea-7131c7d40d4f5bd32b16031e884153548eee133f.tar.gz
gitea-7131c7d40d4f5bd32b16031e884153548eee133f.zip
Configurable SSH cipher suite (#913)
* Configurable SSH cipher suite * Update configuration file comment * Add default in settings loading code * Fix fmt and log messsage * Remove default from code as this could probably might not be good idea
Diffstat (limited to 'modules/setting/setting.go')
-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 0bd73b8cba..0be95daadd 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -96,6 +96,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"`
AuthorizedKeysBackup bool `ini:"SSH_AUTHORIZED_KEYS_BACKUP"`
@@ -708,6 +709,7 @@ func NewContext() {
SSH.Domain = Domain
}
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, "Failed to map SSH settings: %v", err)