Documentation
¶
Index ¶
Constants ¶
View Source
const CacheDir = ".autogov"
default cache dir
View Source
const CacheExpirationHours = 24
default cache expiration
View Source
const CacheFile = "cert-identities.json"
default cache file
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Identity ¶
type Identity struct {
Version string `json:"version"`
Sha string `json:"sha"`
Status string `json:"status"`
Identities []string `json:"identities"`
Added string `json:"added"`
Expires string `json:"expires,omitempty"`
Revoked string `json:"revoked,omitempty"`
Reason string `json:"reason,omitempty"`
}
represents a single certificate identity
type IdentityList ¶
type IdentityList struct {
Identities []Identity `json:"identities,omitempty"`
Metadata struct {
LastUpdated string `json:"last_updated"`
Version string `json:"version"`
Maintainer string `json:"maintainer"`
} `json:"metadata"`
}
contains categorized lists of cert-ids
type Options ¶
type Options struct {
// url to fetch the identity list from
URL string
// disables caching
DisableCache bool
// dir to store cached identity lists
CacheDir string
}
configures the identity validator
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
handles certificate identity validation
func NewValidator ¶
creates a new cert-id validator
func (*Validator) GetValidIdentities ¶
returns the loaded cert-id list returns all valid identities from both latest and approved lists
func (*Validator) IsValidIdentity ¶
checks if the given cert-id is valid
Click to show internal directories.
Click to hide internal directories.