internal

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(elem string, list []string) bool

func FileExists added in v0.6.0

func FileExists(f string) bool

func FlagPassed added in v0.6.0

func FlagPassed(name string) bool

func ParseCert added in v0.6.0

func ParseCert(data []byte) (*x509.Certificate, error)

ParseCert parses a certificate from PEM or DER encoded data into an X.509 certificate

func ParseCertsDer added in v0.6.0

func ParseCertsDer(data any) ([]*x509.Certificate, error)

ParseCertsDer parses DER encoded certificates

func ParseCertsPem added in v0.6.0

func ParseCertsPem(data any) ([]*x509.Certificate, error)

ParseCertsPem parses certificates in a single PEM encoded blob or a list of PEM encoded blobs into a list of X.509 certificates

func PrintTlsConfig

func PrintTlsConfig(conf *tls.Config, roots []byte) error

func VerifyCertChain added in v0.6.0

func VerifyCertChain(certs []*x509.Certificate, cas []*x509.Certificate) ([][]*x509.Certificate, error)

verifyCertChain tries to verify the certificate chain certs with leaf certificate first up to one of the root certificates in cas

func WriteCertPem added in v0.6.0

func WriteCertPem(cert *x509.Certificate) []byte

func WriteCertsDer added in v0.6.0

func WriteCertsDer(certs []*x509.Certificate) [][]byte

func WriteCertsPem added in v0.6.0

func WriteCertsPem(certs []*x509.Certificate) [][]byte

func WritePublicKeyPem added in v0.6.0

func WritePublicKeyPem(key crypto.PublicKey) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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