Documentation ¶
Index ¶
- func CertPoolFromFile(certPath string) (*x509.CertPool, error)
- func LoadTLSCertificateAndPrivateKey(certPath, keyPath string) ([]tls.Certificate, error)
- func LoadX509Certificate(certPath string) (*x509.Certificate, error)
- func LoadX509Certificates(certPath string) ([]*x509.Certificate, error)
- func TLSConfigWithRootAndClientCA(rootCaPath, clientCaPath string) (*tls.Config, error)
- func TLSConfigWithRootAndClientCAAndCert(rootCaPath, clientCaPath, certPath, keyPath string) (*tls.Config, error)
- func TLSConfigWithRootCA(rootCaPath string) (*tls.Config, error)
- func TLSConfigWithRootCAAndCert(rootCaPath, certPath, keyPath string) (*tls.Config, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CertPoolFromFile ¶
CertPoolFromFile loads a single X.509 file and creates a CertPool from it.
func LoadTLSCertificateAndPrivateKey ¶
func LoadTLSCertificateAndPrivateKey( certPath, keyPath string) ([]tls.Certificate, error)
LoadTLSCertificateAndPrivateKey loads an tls.Certificate from a private and public key file in PEM format.
func LoadX509Certificate ¶
func LoadX509Certificate(certPath string) (*x509.Certificate, error)
LoadX509Certificate loads an X.509 certificate from a PEM encoded file.
func LoadX509Certificates ¶
func LoadX509Certificates(certPath string) ([]*x509.Certificate, error)
LoadX509Certificates loads a list of X.509 certificates from a PEM encoded file.
func TLSConfigWithRootAndClientCA ¶
TLSConfigWithRootAndClientCA creates a TLS config with the root and client CAs filled in.
func TLSConfigWithRootAndClientCAAndCert ¶
func TLSConfigWithRootAndClientCAAndCert( rootCaPath, clientCaPath, certPath, keyPath string) (*tls.Config, error)
TLSConfigWithRootAndClientCAAndCert creates a TLS config with the root and client CAs filled in as well as a TLS certificate to authenticate to peers with.
func TLSConfigWithRootCA ¶
TLSConfigWithRootCA creates a TLS config with only the root CA filled in.
Types ¶
This section is empty.