cert

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeCACerts

func EncodeCACerts(certs []CACert) ([]byte, error)

EncodeCACerts encodes a slice of CACerts as a concatenated PEM bundle. It is the inverse of ParseCACerts. Returns nil for an empty slice so callers can treat nil as "no certificates configured".

Types

type CACert

type CACert struct {
	Fingerprint       string
	Issuer            string
	Subject           string
	NotBefore         time.Time
	NotAfter          time.Time
	Base64EncodedData string
}

func Add

func Add(existing, toAdd []CACert) []CACert

Add returns existing with any certs from toAdd whose fingerprint is not already present appended. Existing order and entries are preserved.

func ParseCACerts

func ParseCACerts(data []byte) ([]CACert, error)

func Remove

func Remove(existing, toRemove []CACert) []CACert

Remove returns existing with any certs whose fingerprint appears in toRemove filtered out.

Jump to

Keyboard shortcuts

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