Documentation ¶
Index ¶
- Constants
- func GetClientOptions(certChain *CertChain, serverName string) ([]grpc.DialOption, error)
- func GetServerOptions(certChain *CertChain) ([]grpc.ServerOption, error)
- func TLSConfigFromCertAndKey(certPem, keyPem []byte, serverName string, rootCA *x509.CertPool) (*tls.Config, error)
- type CertChain
- type TLSCredentials
Constants ¶
View Source
const ( // RootCertFilename is the filename that holds the root certificate. RootCertFilename = "ca.crt" // IssuerCertFilename is the filename that holds the issuer certificate. IssuerCertFilename = "issuer.crt" // IssuerKeyFilename is the filename that holds the issuer key. IssuerKeyFilename = "issuer.key" )
Variables ¶
This section is empty.
Functions ¶
func GetClientOptions ¶
func GetClientOptions(certChain *CertChain, serverName string) ([]grpc.DialOption, error)
func GetServerOptions ¶
func GetServerOptions(certChain *CertChain) ([]grpc.ServerOption, error)
Types ¶
type CertChain ¶
CertChain holds the certificate trust chain PEM values.
func LoadFromDisk ¶
LoadFromDisk retruns a CertChain from a given directory.
type TLSCredentials ¶
type TLSCredentials struct {
// contains filtered or unexported fields
}
TLSCredentials holds paths for credentials.
func NewTLSCredentials ¶
func NewTLSCredentials(path string) TLSCredentials
NewTLSCredentials returns a new TLSCredentials.
func (*TLSCredentials) CertPath ¶
func (t *TLSCredentials) CertPath() string
CertPath returns the file path for the cert.
func (*TLSCredentials) KeyPath ¶
func (t *TLSCredentials) KeyPath() string
KeyPath returns the file path for the cert key.
func (*TLSCredentials) Path ¶
func (t *TLSCredentials) Path() string
Path returns the directory holding the TLS credentials.
func (*TLSCredentials) RootCertPath ¶
func (t *TLSCredentials) RootCertPath() string
RootCertPath returns the file path for the root cert.
Click to show internal directories.
Click to hide internal directories.