credentials

package
v1.71.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func 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.

func 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.

func NewServerTLSFromCertWithALPNDisabled

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

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

func 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.

func NewTLSWithALPNDisabled

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

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

Types

This section is empty.

Directories

Path Synopsis
Package internal defines APIs for parsing SPIFFE ID.
Package internal defines APIs for parsing SPIFFE ID.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL