Versions in this module Expand all Collapse all v0 v0.0.5 Sep 22, 2021 Changes in this version + func AppendNewCertsToTrustRoots(tlsTrustRoots *ChainTrustRoots, chainId string, certPemBytes []byte) (bool, error) + func GetCertAndPeerIdWithKeyPair(certPEMBlock []byte, keyPEMBlock []byte) (*tls.Certificate, string, error) + func NewTlsConfig(certificate tls.Certificate, certValidator *CertValidator) (*tls.Config, error) + type CertValidator struct + func NewCertValidator(tlsTrustRoots *ChainTrustRoots, ...) *CertValidator + func (v *CertValidator) QueryDerivedInfoWithPeerId(peerId string) *DerivedInfoWithCert + func (v *CertValidator) VerifyPeerCertificateFunc() func(rawCerts [][]byte, _ [][]*x509.Certificate) error + type ChainTrustRoots struct + func BuildTlsTrustRoots(chainTrustRoots map[string][][]byte) (*ChainTrustRoots, error) + func NewChainTrustRoots() *ChainTrustRoots + func (ctr *ChainTrustRoots) AddIntermediates(chainId string, intermediates *x509.Certificate) + func (ctr *ChainTrustRoots) AddRoot(chainId string, root *x509.Certificate) + func (ctr *ChainTrustRoots) AppendIntermediatesFromPem(chainId string, intermediatesPem []byte) bool + func (ctr *ChainTrustRoots) AppendRootsFromPem(chainId string, rootPem []byte) bool + func (ctr *ChainTrustRoots) IntermediatesPool(chainId string) (*x509.CertPool, bool) + func (ctr *ChainTrustRoots) RefreshIntermediatesFromPem(chainId string, intermediatesPem [][]byte) bool + func (ctr *ChainTrustRoots) RefreshRootsFromPem(chainId string, rootsPem [][]byte) bool + func (ctr *ChainTrustRoots) RootsPool(chainId string) (*x509.CertPool, bool) + func (ctr *ChainTrustRoots) VerifyCert(cert *x509.Certificate) ([]string, error) + func (ctr *ChainTrustRoots) VerifyCertOfChain(chainId string, cert *x509.Certificate) bool + type DerivedInfoWithCert struct + CertId string + ChainIds []string + PeerId string + TlsCertBytes []byte