certificateauthority

package
v0.2.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2023 License: Apache-2.0 Imports: 6 Imported by: 1

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL