truststore

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCert

func AddCert(path, storeType, namedStore string, display bool) error

AddCert adds a single cert file at path to the trust store under dir truststore/x509/storeType/namedStore

func CheckNonErrNotExistError

func CheckNonErrNotExistError(err error) error

CheckNonErrNotExistError returns nil when no err or err is fs.ErrNotExist

func DeleteAllCerts

func DeleteAllCerts(storeType, namedStore string, confirmed bool) error

DeleteAllCerts deletes all certificate files from the trust store under dir truststore/x509/storeType/namedStore

func DeleteCert

func DeleteCert(storeType, namedStore, cert string, confirmed bool) error

DeleteCert deletes a specific certificate file from the trust store, namely truststore/x509/storeType/namedStore/cert

func IsValidFileName

func IsValidFileName(fileName string) bool

IsValidFileName checks if a file name is cross-platform compatible

func IsValidStoreType

func IsValidStoreType(storeType string) bool

IsValidStoreType checks if storeType is supported

func ListCerts

func ListCerts(root string, depth int) ([]string, error)

ListCerts walks through root and returns all x509 certificates in it, sub-dirs are ignored.

func ShowCerts

func ShowCerts(certs []*x509.Certificate)

ShowCerts writes out details of certificates

Types

This section is empty.

Jump to

Keyboard shortcuts

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