-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Directly expose the SSH server KEXT, MAC and Cipher algorithms #86
base: master
Are you sure you want to change the base?
Conversation
Note that I may end up dropping this if we don't need this for gitea. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.