-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
advancedTLS: Combine ClientOptions
and ServerOptions
to just Options
#7202
Conversation
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.
LGTM, just a few minor things.
security/advancedtls/advancedtls.go
Outdated
// Deprecated: use Options instead. | ||
type ServerOptions = Options | ||
|
||
// Options contains the fields a user can configure when settings up TLS clients |
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.
*setting up
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.
Fixed
security/advancedtls/advancedtls.go
Outdated
@@ -261,9 +213,11 @@ type ServerOptions struct { | |||
// RootOptions is OPTIONAL on server side. This field only needs to be set if | |||
// mutual authentication is required(RequireClientCert is true). | |||
RootOptions RootCertificateOptions | |||
// If the server want the client to send certificates. | |||
// If the server want the client to send certificates. This value is only |
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.
want -> wants. Or "requires" probably is more precise.
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.
Fixed
ClientOptions
andServerOptions
were basically identical minus a few fields. Duplicating so much code and documentation is messy. Given both have a single field each that are not relevant to the other, I think that we can just combine them and document that.RELEASE NOTES: none