Documentation
¶
Overview ¶
Package truststore reads certificates in a trust store
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Types = []Type{ TypeCA, TypeSigningAuthority, } )
Functions ¶
func ValidateCertificates ¶
func ValidateCertificates(certs []*x509.Certificate) error
ValidateCertificates ensures certificates from trust store are CA certificates or self-signed.
Types ¶
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.