Documentation ¶
Index ¶
- func NewClientTLSFromCert(cp *sm2.CertPool, serverNameOverride string) credentials.TransportCredentials
- func NewClientTLSFromFile(certFile, serverNameOverride string) (credentials.TransportCredentials, error)
- func NewServerTLSFromCert(cert *gmtls.Certificate) credentials.TransportCredentials
- func NewServerTLSFromFile(certFile, keyFile string) (credentials.TransportCredentials, error)
- func NewTLS(c *gmtls.Config) credentials.TransportCredentials
- type TLSChannelzSecurityValue
- type TLSInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClientTLSFromCert ¶
func NewClientTLSFromCert(cp *sm2.CertPool, serverNameOverride string) credentials.TransportCredentials
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 can be specified. serverNameOverride is for testing only. If set to a non empty string, it will override the virtual host name of authority (e.g. :authority header field) in requests.
func NewClientTLSFromFile ¶
func NewClientTLSFromFile(certFile, serverNameOverride string) (credentials.TransportCredentials, error)
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 be included in the credentials (eg: for mTLS), use NewTLS instead, where a complete tls.Config can be specified. serverNameOverride is for testing only. If set to a non empty string, it will override the virtual host name of authority (e.g. :authority header field) in requests.
func NewServerTLSFromCert ¶
func NewServerTLSFromCert(cert *gmtls.Certificate) credentials.TransportCredentials
NewServerTLSFromCert constructs TLS credentials from the input certificate for server.
func NewServerTLSFromFile ¶
func NewServerTLSFromFile(certFile, keyFile string) (credentials.TransportCredentials, error)
NewServerTLSFromFile constructs TLS credentials from the input certificate file and key file for server.
func NewTLS ¶
func NewTLS(c *gmtls.Config) credentials.TransportCredentials
NewTLS uses c to construct a TransportCredentials based on TLS.
Types ¶
type TLSChannelzSecurityValue ¶
type TLSChannelzSecurityValue struct { credentials.ChannelzSecurityValue StandardName string LocalCertificate []byte RemoteCertificate []byte }
TLSChannelzSecurityValue defines the struct that TLS protocol should return from GetSecurityValue(), containing security info like cipher and certificate used.
This API is EXPERIMENTAL.
type TLSInfo ¶
type TLSInfo struct { State gmtls.ConnectionState credentials.CommonAuthInfo }
TLSInfo contains the auth information for a TLS authenticated connection. It implements the AuthInfo interface.
func (TLSInfo) GetSecurityValue ¶
func (t TLSInfo) GetSecurityValue() credentials.ChannelzSecurityValue
GetSecurityValue returns security info requested by channelz.
Directories ¶
Path | Synopsis |
---|---|
Package echo is a generated protocol buffer package.
|
Package echo is a generated protocol buffer package. |
Package internal contains gRPC-internal code, to avoid polluting the godoc of the top-level grpc package.
|
Package internal contains gRPC-internal code, to avoid polluting the godoc of the top-level grpc package. |
grpctest
Package grpctest implements testing helpers.
|
Package grpctest implements testing helpers. |
leakcheck
Package leakcheck contains functions to check leaked goroutines.
|
Package leakcheck contains functions to check leaked goroutines. |