tlsutil

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCertPool

func GetCertPool(useSystemCertPool bool, tlsCACerts []string) (*x509.CertPool, error)

GetCertPool get cert pool.

Types

type CertPool

type CertPool struct {
	// contains filtered or unexported fields
}

CertPool is a thread safe wrapper around the x509 standard library cert pool implementation. It optionally allows loading the system trust store.

func NewCertPool

func NewCertPool(useSystemCertPool bool) (*CertPool, error)

NewCertPool new CertPool implementation.

func (*CertPool) Add

func (c *CertPool) Add(certs ...*x509.Certificate)

Add adds given certs to cert pool queue, those certs will be added to certpool during subsequent Get() call.

func (*CertPool) Get

func (c *CertPool) Get() (*x509.CertPool, error)

Get returns certpool. If there are any certs in cert queue added by any previous Add() call it adds those certs to certpool before returning.

Jump to

Keyboard shortcuts

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