Documentation ¶
Overview ¶
Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadCAConfig ¶
func LoadCAConfig(caConfiguration *config.CAConfiguration) (*types.CAConfig, error)
LoadCAConfig loads the Root CA and Intermediate CA certificates defined in the configuration.
Types ¶
type CACertCollection ¶
type CACertCollection struct {
// contains filtered or unexported fields
}
func NewCACertCollection ¶
func NewCACertCollection(rootCAs [][]byte, intermediateCAs [][]byte) (*CACertCollection, error)
NewCACertCollection creates a new CACertCollection from a set of root CAs and intermediate CAs. The certificate are in raw format, i.e. ASN.1 DER data.
func (*CACertCollection) GetCertPool ¶
func (c *CACertCollection) GetCertPool() *x509.CertPool
GetCertPool combines all the CA certificates, root & intermediate, into a single x509.CertPool.
func (*CACertCollection) VerifyCollection ¶
func (c *CACertCollection) VerifyCollection() error
VerifyCollection verifies each CA certificate in the collection, to make sure each one is part of a valid chain.
func (*CACertCollection) VerifyLeafCert ¶
func (c *CACertCollection) VerifyLeafCert(asn1Data []byte) error
VerifyLeafCert verifies the given leaf certificate against the CA certificates in the collection.
Click to show internal directories.
Click to hide internal directories.