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 be included in the credentials (eg: for mTLS), use NewTLS instead, where a complete tls.Config c
(cp *x509.CertPool, serverNameOverride string)
| 267 | // requests. Users should use grpc.WithAuthority passed to grpc.NewClient to |
| 268 | // override the authority of the client instead. |
| 269 | func NewClientTLSFromCert(cp *x509.CertPool, serverNameOverride string) TransportCredentials { |
| 270 | return NewTLS(&tls.Config{ServerName: serverNameOverride, RootCAs: cp}) |
| 271 | } |
| 272 | |
| 273 | // NewClientTLSFromFile constructs TLS credentials from the provided root |
| 274 | // certificate authority certificate file(s) to validate server connections. If |
no test coverage detected