Documentation ¶
Index ¶
- func ClientTLSConfig(project string, caCert *x509.Certificate, ...) *tls.Config
- func ServerTLSConfig(project string, caCert *x509.Certificate, ...) *tls.Config
- func VerifyCertificateChain(project string, caCert *x509.Certificate, certs []*x509.Certificate) (string, error)
- func VerifyRawCertificateChain(project string, caCert *x509.Certificate, certsDER [][]byte) (string, error)
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.
Click to show internal directories.
Click to hide internal directories.