Documentation ¶
Overview ¶
Generated on 2018-05-29T09:11:15Z by adam, any modifications will be overwritten
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Whitelist ¶
type Whitelist struct { // SHA256 fingerprints Fingerprints []string `json:"Fingerprints,omitempty" yaml:"fingerprints,omitempty"` // ISO 3166-1 two-letter country codes used to match // RFC 2253 Distinguished Names in certificates Countries []string `json:"Countries,omitempty" yaml:"countries,omitempty"` }
Whitelist is the structure holding various `item` types that match against x509 certificates
func FromCertificates ¶
func FromCertificates(certs []*x509.Certificate) Whitelist
FromCertificates returns a Whitelist with only the fingerprints of the passed certificates included.
func (Whitelist) Matches ¶
func (w Whitelist) Matches(inc *x509.Certificate) bool
Matches checks a given x509 certificate against the criteria and returns if it's matched by an item in the whitelist
func (Whitelist) MatchesAll ¶
func (w Whitelist) MatchesAll(cs []*x509.Certificate) bool
MatchesAll checks if a given list of certificates all match against a whitelist
Click to show internal directories.
Click to hide internal directories.