Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrTrustCrtsDirEmpty = errors.New("trust certs dir is empty")
)
Functions ¶
func GetTLSConfig ¶
Types ¶
type CAClient ¶
type CAClient struct { ServerName string CaPaths []string CaCerts []string CertFile string KeyFile string CertBytes []byte KeyBytes []byte Logger log.LoggerInterface //for gmtls1.1 EncCertFile string EncKeyFile string EncCertBytes []byte EncKeyBytes []byte }
func (*CAClient) GetCredentialsByCA ¶
func (c *CAClient) GetCredentialsByCA() (*credentials.TransportCredentials, error)
type CAServer ¶
type CAServer struct { CaPaths []string CaCerts []string CertFile string KeyFile string Logger log.LoggerInterface }
func (*CAServer) GetCredentialsByCA ¶
func (s *CAServer) GetCredentialsByCA(checkClientAuth bool, customVerify CustomVerify) ( *credentials.TransportCredentials, error)
type CustomVerify ¶
type CustomVerify struct { VerifyPeerCertificate func(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error GMVerifyPeerCertificate func(rawCerts [][]byte, verifiedChains [][]*cmx509.Certificate) error }
Click to show internal directories.
Click to hide internal directories.