"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "modules/ssh/ssh.go" between
gitea-1.13.1.tar.gz and gitea-1.13.2.tar.gz

About: Gitea allows to set up a self-hosted code hosting Git service (a fork of Gogs).

ssh.go  (gitea-1.13.1):ssh.go  (gitea-1.13.2)
skipping to change at line 199 skipping to change at line 199
return false return false
} }
ctx.SetValue(giteaKeyID, pkey.ID) ctx.SetValue(giteaKeyID, pkey.ID)
return true return true
} }
// Listen starts a SSH server listens on given port. // Listen starts a SSH server listens on given port.
func Listen(host string, port int, ciphers []string, keyExchanges []string, macs []string) { func Listen(host string, port int, ciphers []string, keyExchanges []string, macs []string) {
// TODO: Handle ciphers, keyExchanges, and macs
srv := ssh.Server{ srv := ssh.Server{
Addr: fmt.Sprintf("%s:%d", host, port), Addr: fmt.Sprintf("%s:%d", host, port),
PublicKeyHandler: publicKeyHandler, PublicKeyHandler: publicKeyHandler,
Handler: sessionHandler, Handler: sessionHandler,
ServerConfigCallback: func(ctx ssh.Context) *gossh.ServerConfig {
config := &gossh.ServerConfig{}
config.KeyExchanges = keyExchanges
config.MACs = macs
config.Ciphers = ciphers
return config
},
// We need to explicitly disable the PtyCallback so text displays // We need to explicitly disable the PtyCallback so text displays
// properly. // properly.
PtyCallback: func(ctx ssh.Context, pty ssh.Pty) bool { PtyCallback: func(ctx ssh.Context, pty ssh.Pty) bool {
return false return false
}, },
} }
keyPath := filepath.Join(setting.AppDataPath, "ssh/gogs.rsa") keyPath := filepath.Join(setting.AppDataPath, "ssh/gogs.rsa")
if !com.IsExist(keyPath) { if !com.IsExist(keyPath) {
filePath := filepath.Dir(keyPath) filePath := filepath.Dir(keyPath)
 End of changes. 2 change blocks. 
3 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)