cert

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

type Pool struct {
	Certs *x509.CertPool
}

Pool is a storage for RootCAs, used in http requests

func MakePool

func MakePool(certFiles ...string) (*Pool, error)

MakePool copies the system CA pool and appends provided certificates, if any. Accepts zero or more certificate files as arguments. Empty strings are ignored

func (Pool) AppendCAs

func (pool Pool) AppendCAs() error

AppendCAs adds select known, trusted root certificate authorities to the pool Currently adds: Comodo

func (Pool) AppendFromFiles

func (pool Pool) AppendFromFiles(certFiles []string) error

AppendFromFiles loads the certs from a slice of filenames to the cert pool

Jump to

Keyboard shortcuts

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