Versions in this module Expand all Collapse all v0 v0.0.0 Dec 28, 2022 Changes in this version + func BuildTLSClientConfig(cfg *config.TLSClientConfig) (*tls.Config, error) + func BuildTLSServerConfig(cfg *config.TLSServerConfig) (*tls.Config, error) + func ParseCertificatePemFile(filepath string) (*x509.Certificate, error) + func ParsePKCS12File(config config.MTLSCertLoadConfig) (*tls.Certificate, error) + func ParsePrivateKeyPemFile(filepath string) (crypto.PrivateKey, error) + type ClientCertGenerateParameter struct + CommonName string + PKCS12password string + RootCACertFile string + RootCAKeyFile string + SerialNumber *big.Int + TTL time.Duration + type ClientCertGenerateResult struct + PKCS12 []byte + TLS *tls.Certificate + func NewClientCert(rng io.Reader, now time.Time, params ClientCertGenerateParameter) (ClientCertGenerateResult, error) + type RootCAGenerateRequest struct + CommonName string + FilePathBase string + NotAfter time.Time + NotBefore time.Time + RNG io.Reader + type RootCAGenerateResult struct + CACert *x509.Certificate + CACertFile string + PrivateKey crypto.PrivateKey + PrivateKeyFile string + PublicKey crypto.PublicKey + func NewSelfSignedRootCA(req *RootCAGenerateRequest) (*RootCAGenerateResult, error) + func (result *RootCAGenerateResult) CACertAsPool() *x509.CertPool