Documentation
¶
Index ¶
- type ChainLoadedError
- type Loader
- type Organization
- type ParsedAndValidatedCertificate
- type ParsedCertificate
- type Parser
- func (p *Parser) GetChain(certificates [][]byte) (*x509.CertPool, error)
- func (p *Parser) IsRevoked(c *crt.Certificate) (bool, error)
- func (p *Parser) IsTrusted(c *crt.Certificate) (bool, error)
- func (p *Parser) LoadCertFromBytes(content []byte, uri string) ([]*crt.Certificate, error)
- func (p *Parser) LoadParentCertificates(c *crt.Certificate) ([]*crt.Certificate, error)
- func (p *Parser) LoadRootChain(c *crt.Certificate) (*x509.CertPool, error)
- func (p *Parser) Parse(crt *crt.Certificate) (ParsedCertificate, error)
- func (p *Parser) ParseAndValidate(crt *crt.Certificate) (ParsedAndValidatedCertificate, error)
- func (p *Parser) ParseOrganization(org pkix.Name) Organization
- type Plugin
- type PluginParseResult
- type Saver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChainLoadedError ¶
type ChainLoadedError struct {
Err error
}
ChainLoadedError This error is thrown when the whole chain is loaded and we don't need to iterate through the links anymore
func (*ChainLoadedError) Error ¶
func (e *ChainLoadedError) Error() string
type Organization ¶
type Organization struct {
Country string `json:"country,omitempty"`
Organization string `json:"organization,omitempty"`
OrganizationalUnit string `json:"organizational_unit,omitempty"`
Locality string `json:"locality,omitempty"`
Province string `json:"province,omitempty"`
StreetAddress string `json:"street_address,omitempty"`
PostalCode string `json:"postal_code,omitempty"`
SerialNumber string `json:"serial_number,omitempty"`
CommonName string `json:"common_name,omitempty"`
Unit string `json:"unit,omitempty"`
}
type ParsedAndValidatedCertificate ¶
type ParsedAndValidatedCertificate struct {
ParsedCertificate
IsTrusted bool `json:"is_trusted"`
IsRevoked bool `json:"is_revoked"`
IsValid bool `json:"is_valid"`
}
type ParsedCertificate ¶
type ParsedCertificate struct {
Sha256 string `json:"sha256"`
Issuer Organization `json:"issuer"`
Subject Organization `json:"subject"`
NotBefore time.Time `json:"not_before"`
NotAfter time.Time `json:"not_after"`
SerialNumber *big.Int `json:"serial_number"`
KeyUsage []string `json:"key_usage"`
ExtKeyUsage []string `json:"ext_key_usage"`
ParentLinks []string `json:"parent_links"`
CrlLinks []string `json:"crl_link"`
Plugins map[string]PluginParseResult `json:"plugins"`
}
type Parser ¶
func (*Parser) LoadCertFromBytes ¶
func (*Parser) LoadParentCertificates ¶
func (p *Parser) LoadParentCertificates(c *crt.Certificate) ([]*crt.Certificate, error)
func (*Parser) LoadRootChain ¶
func (*Parser) Parse ¶
func (p *Parser) Parse(crt *crt.Certificate) (ParsedCertificate, error)
func (*Parser) ParseAndValidate ¶
func (p *Parser) ParseAndValidate(crt *crt.Certificate) (ParsedAndValidatedCertificate, error)
func (*Parser) ParseOrganization ¶
func (p *Parser) ParseOrganization(org pkix.Name) Organization
type Plugin ¶
type Plugin interface {
Parse(c *crt.Certificate) PluginParseResult
}
type PluginParseResult ¶
type PluginParseResult interface {
}
Click to show internal directories.
Click to hide internal directories.