-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
credentials: Update doc strings for NewClientTLSFromCert et. al. #3508
Conversation
credentials/tls.go
Outdated
// NewClientTLSFromCert constructs TLS credentials from the input certificate for client. | ||
// NewClientTLSFromCert constructs TLS credentials from the provided root | ||
// certificate authority certificate(s) to validate server connections. If | ||
// certificates to establish the identity of the client need to included in the |
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.
need to BE included
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.
Done. Thanks.
credentials/tls.go
Outdated
// NewClientTLSFromFile constructs TLS credentials from the input certificate file for client. | ||
// NewClientTLSFromFile constructs TLS credentials from the provided root | ||
// certificate authority certificate file(s) to validate server connections. If | ||
// certificates to establish the identity of the client need to included in the |
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.
BE
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.
Done. Thanks.
func NewClientTLSFromCert(cp *x509.CertPool, serverNameOverride string) TransportCredentials { | ||
return NewTLS(&tls.Config{ServerName: serverNameOverride, RootCAs: cp}) | ||
} | ||
|
||
// NewClientTLSFromFile constructs TLS credentials from the input certificate file for client. | ||
// NewClientTLSFromFile constructs TLS credentials from the provided root | ||
// certificate authority certificate file(s) to validate server connections. If |
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.
nit: AFAICT, this is a single file, though it may contain more than one certificate, so the "(s)" should still belong to "certificate"
Fixes #3507