Documentation
¶
Overview ¶
Package truststore reads certificates in a trust store
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Types = []Type{ TypeCA, TypeSigningAuthority, TypeTSA, } )
Functions ¶
func ValidateCertificates ¶
func ValidateCertificates(certs []*x509.Certificate) error
ValidateCertificates ensures certificates from trust store are CA certificates or self-signed.
Types ¶
type CertificateError ¶ added in v1.0.1
CertificateError is used when reading a certificate failed
func (CertificateError) Error ¶ added in v1.0.1
func (e CertificateError) Error() string
func (CertificateError) Unwrap ¶ added in v1.0.1
func (e CertificateError) Unwrap() error
type TrustStoreError ¶ added in v1.0.1
TrustStoreError is used when accessing specified trust store failed
func (TrustStoreError) Error ¶ added in v1.0.1
func (e TrustStoreError) Error() string
func (TrustStoreError) Unwrap ¶ added in v1.0.1
func (e TrustStoreError) Unwrap() error
type Type ¶
type Type string
Type is an enum for trust store types supported such as "ca" and "signingAuthority"
type X509TrustStore ¶
type X509TrustStore interface { // GetCertificates returns certificates under storeType/namedStore GetCertificates(ctx context.Context, storeType Type, namedStore string) ([]*x509.Certificate, error) }
X509TrustStore provide list and get behaviors for the trust store
func NewX509TrustStore ¶
func NewX509TrustStore(trustStorefs dir.SysFS) X509TrustStore
NewX509TrustStore generates a new X509TrustStore
Click to show internal directories.
Click to hide internal directories.