Versions in this module Expand all Collapse all v2 v2.3.3 Oct 19, 2023 Changes in this version + var ErrTrustCrtsDirEmpty = errors.New("trust certs dir is empty") + func GetTLSConfig(certPemPath, certKeyPath string, caPaths, caCerts []string, ...) (*cmtls.Config, error) + func NewTLSListener(inner net.Listener, config *cmtls.Config) net.Listener + type CAClient struct + CaCerts []string + CaPaths []string + CertBytes []byte + CertFile string + EncCertBytes []byte + EncCertFile string + EncKeyBytes []byte + EncKeyFile string + KeyBytes []byte + KeyFile string + Logger log.LoggerInterface + ServerName string + func (c *CAClient) GetCredentialsByCA() (*credentials.TransportCredentials, error) + type CAServer struct + CaCerts []string + CaPaths []string + CertFile string + KeyFile string + Logger log.LoggerInterface + func (s *CAServer) GetCredentialsByCA(checkClientAuth bool, customVerify CustomVerify) (*credentials.TransportCredentials, error) + type CustomVerify struct + GMVerifyPeerCertificate func(rawCerts [][]byte, verifiedChains [][]*cmx509.Certificate) error + VerifyPeerCertificate func(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error