Directly expose the SSH server KEXT, MAC and Cipher algorithms#86
Directly expose the SSH server KEXT, MAC and Cipher algorithms#86
Conversation
|
Note that I may end up dropping this if we don't need this for gitea. |
There was a problem hiding this comment.
In x/crypto/ssh, these are buried/bundled under another struct layer of Config: https://godoc.org/golang.org/x/crypto/ssh#Config
Would it be a good idea to do that here as well? Especially since most people won't need them.
Would it make sense to use the original ssh.Config type and pass it along?
|
I did consider exposing the raw SSH config. I suppose that makes more sense since it should only be needed in very specific cases. Do you have any opinions on copying the config vs just referencing it? I find it a little odd that we create a new server config for every connection. Thanks for your comments! |
|
I don't have strong feelings either way, just an idea. :) |
|
I could go either way. At the moment at least. |
|
I'd like to clean up some of the config handling and make it per call to listen, but that doesn't need to happen right now. |
I believe this is one of the last pieces needed for go-gitea/gitea#3896
There may be a better interface for this, but it looks like this was designed so you can change the server config in the middle of running so there's a little extra code to make sure the slice gets copied and not just referenced.