Search and commands

↑ ↓ to select · Enter to open · Esc to close

Type to search packages.

credentials

v1.85.0
google.golang.org/grpc/experimental/credentials

Documentation

pkg.go.dev ↗

Table of contents

↓ to select · Enter to jump· Shift+Enter for source

6 matches

Top ↑

Package credentials provides experimental TLS credentials. The use of this package is strongly discouraged. These credentials exist solely to maintain compatibility for users interacting with clients that violate the HTTP/2 specification by not advertising support for "h2" in ALPN. This package is slated for removal in upcoming grpc-go releases. Users must not rely on this package directly. Instead, they should either vendor a specific version of gRPC or copy the relevant credentials into their own codebase if absolutely necessary.

Functions

NewClientTLSFromCertWithALPNDisabled

func NewClientTLSFromCertWithALPNDisabled(cp *x509.CertPool, serverNameOverride string) credentials.TransportCredentials

NewClientTLSFromCertWithALPNDisabled 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. ALPN verification is disabled.

NewClientTLSFromFileWithALPNDisabled

func NewClientTLSFromFileWithALPNDisabled(certFile, serverNameOverride string) (credentials.TransportCredentials, error)

NewClientTLSFromFileWithALPNDisabled 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. ALPN verification is disabled.

NewServerTLSFromCertWithALPNDisabled

func NewServerTLSFromCertWithALPNDisabled(cert *tls.Certificate) credentials.TransportCredentials

NewServerTLSFromCertWithALPNDisabled constructs TLS credentials from the input certificate for server. ALPN verification is disabled.

NewServerTLSFromFileWithALPNDisabled

func NewServerTLSFromFileWithALPNDisabled(certFile, keyFile string) (credentials.TransportCredentials, error)

NewServerTLSFromFileWithALPNDisabled constructs TLS credentials from the input certificate file and key file for server. ALPN verification is disabled.

NewTLSWithALPNDisabled

func NewTLSWithALPNDisabled(c *tls.Config) credentials.TransportCredentials

NewTLSWithALPNDisabled uses c to construct a TransportCredentials based on TLS. ALPN verification is disabled.

Dependency graph