mtls

package
v0.23.5 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientTLSConfig

func ClientTLSConfig(project string, caCert *x509.Certificate, getSelfCert func() ([]byte, []byte, error), expectedPeer string) *tls.Config

ClientTLSConfig returns the TLS configuration that a HTTP client should use to communicate using mTLS.

func ServerTLSConfig

func ServerTLSConfig(project string, caCert *x509.Certificate, getSelfCert func() ([]byte, []byte, error), expectedPeers ...string) *tls.Config

ServerTLSConfig returns the TLS configuration that a HTTP server should use to communicate using mTLS.

func VerifyCertificateChain

func VerifyCertificateChain(project string, caCert *x509.Certificate, certs []*x509.Certificate) (string, error)

VerifyCertificateChain verifies the given certificate chain, returning the name encoded in its leaf certificate.

func VerifyRawCertificateChain

func VerifyRawCertificateChain(project string, caCert *x509.Certificate, certsDER [][]byte) (string, error)

VerifyRawCertificateChain verifies the given DER-encoded certificate chain, returning the name encoded in its leaf certificate.

Types

This section is empty.

Jump to

Keyboard shortcuts

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