lints

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2020 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation ¶

Index ¶

Constants ¶

This section is empty.

Variables ¶

View Source
var (
	// Lints is a map of all known lints by name. Add a Lint to the map by calling
	// RegisterLint.
	Lints = make(map[string]*Lint)
)

Functions ¶

func ReadCertificate ¶

func ReadCertificate(inPath string) *x509.Certificate

func RegisterLint ¶

func RegisterLint(l *Lint)

RegisterLint must be called once for each lint to be excuted. Duplicate lint names are squashed. Normally, RegisterLint is called during init().

Types ¶

type CertContainsUniqueIdentifier ¶

type CertContainsUniqueIdentifier struct{}

func (*CertContainsUniqueIdentifier) CheckApplies ¶

func (l *CertContainsUniqueIdentifier) CheckApplies(cert *x509.Certificate) bool

func (*CertContainsUniqueIdentifier) Execute ¶

func (*CertContainsUniqueIdentifier) Initialize ¶

func (l *CertContainsUniqueIdentifier) Initialize() error

type CertExtensionsVersonNot3 ¶

type CertExtensionsVersonNot3 struct{}

func (*CertExtensionsVersonNot3) CheckApplies ¶

func (l *CertExtensionsVersonNot3) CheckApplies(cert *x509.Certificate) bool

func (*CertExtensionsVersonNot3) Execute ¶

func (*CertExtensionsVersonNot3) Initialize ¶

func (l *CertExtensionsVersonNot3) Initialize() error

type CertPolicyIVRequiresCountry ¶

type CertPolicyIVRequiresCountry struct{}

func (*CertPolicyIVRequiresCountry) CheckApplies ¶

func (l *CertPolicyIVRequiresCountry) CheckApplies(cert *x509.Certificate) bool

func (*CertPolicyIVRequiresCountry) Execute ¶

func (*CertPolicyIVRequiresCountry) Initialize ¶

func (l *CertPolicyIVRequiresCountry) Initialize() error

type CertPolicyIVRequiresProvinceOrLocal ¶

type CertPolicyIVRequiresProvinceOrLocal struct{}

func (*CertPolicyIVRequiresProvinceOrLocal) CheckApplies ¶

func (*CertPolicyIVRequiresProvinceOrLocal) Execute ¶

func (*CertPolicyIVRequiresProvinceOrLocal) Initialize ¶

type CertPolicyOVRequiresCountry ¶

type CertPolicyOVRequiresCountry struct{}

func (*CertPolicyOVRequiresCountry) CheckApplies ¶

func (l *CertPolicyOVRequiresCountry) CheckApplies(cert *x509.Certificate) bool

func (*CertPolicyOVRequiresCountry) Execute ¶

func (*CertPolicyOVRequiresCountry) Initialize ¶

func (l *CertPolicyOVRequiresCountry) Initialize() error

type CertPolicyOVRequiresProvinceOrLocal ¶

type CertPolicyOVRequiresProvinceOrLocal struct{}

func (*CertPolicyOVRequiresProvinceOrLocal) CheckApplies ¶

func (*CertPolicyOVRequiresProvinceOrLocal) Execute ¶

func (*CertPolicyOVRequiresProvinceOrLocal) Initialize ¶

type CertPolicyRequiresOrg ¶

type CertPolicyRequiresOrg struct{}

func (*CertPolicyRequiresOrg) CheckApplies ¶

func (l *CertPolicyRequiresOrg) CheckApplies(cert *x509.Certificate) bool

func (*CertPolicyRequiresOrg) Execute ¶

func (l *CertPolicyRequiresOrg) Execute(cert *x509.Certificate) *LintResult

func (*CertPolicyRequiresOrg) Initialize ¶

func (l *CertPolicyRequiresOrg) Initialize() error

type CertPolicyRequiresPersonalName ¶

type CertPolicyRequiresPersonalName struct{}

func (*CertPolicyRequiresPersonalName) CheckApplies ¶

func (l *CertPolicyRequiresPersonalName) CheckApplies(cert *x509.Certificate) bool

func (*CertPolicyRequiresPersonalName) Execute ¶

func (*CertPolicyRequiresPersonalName) Initialize ¶

func (l *CertPolicyRequiresPersonalName) Initialize() error

type DNSNameEmptyLabel ¶

type DNSNameEmptyLabel struct{}

func (*DNSNameEmptyLabel) CheckApplies ¶

func (l *DNSNameEmptyLabel) CheckApplies(c *x509.Certificate) bool

func (*DNSNameEmptyLabel) Execute ¶

func (l *DNSNameEmptyLabel) Execute(c *x509.Certificate) *LintResult

func (*DNSNameEmptyLabel) Initialize ¶

func (l *DNSNameEmptyLabel) Initialize() error

type DNSNameHyphenInSLD ¶

type DNSNameHyphenInSLD struct{}

func (*DNSNameHyphenInSLD) CheckApplies ¶

func (l *DNSNameHyphenInSLD) CheckApplies(c *x509.Certificate) bool

func (*DNSNameHyphenInSLD) Execute ¶

func (*DNSNameHyphenInSLD) Initialize ¶

func (l *DNSNameHyphenInSLD) Initialize() error

type DNSNameLabelLengthTooLong ¶

type DNSNameLabelLengthTooLong struct{}

func (*DNSNameLabelLengthTooLong) CheckApplies ¶

func (l *DNSNameLabelLengthTooLong) CheckApplies(c *x509.Certificate) bool

func (*DNSNameLabelLengthTooLong) Execute ¶

func (*DNSNameLabelLengthTooLong) Initialize ¶

func (l *DNSNameLabelLengthTooLong) Initialize() error

type DNSNameLeftLabelWildcardCheck ¶

type DNSNameLeftLabelWildcardCheck struct{}

func (*DNSNameLeftLabelWildcardCheck) CheckApplies ¶

func (l *DNSNameLeftLabelWildcardCheck) CheckApplies(c *x509.Certificate) bool

func (*DNSNameLeftLabelWildcardCheck) Execute ¶

func (*DNSNameLeftLabelWildcardCheck) Initialize ¶

func (l *DNSNameLeftLabelWildcardCheck) Initialize() error

type DNSNameProperCharacters ¶

type DNSNameProperCharacters struct {
	CompiledExpression *regexp.Regexp
}

func (*DNSNameProperCharacters) CheckApplies ¶

func (l *DNSNameProperCharacters) CheckApplies(c *x509.Certificate) bool

func (*DNSNameProperCharacters) Execute ¶

func (*DNSNameProperCharacters) Initialize ¶

func (l *DNSNameProperCharacters) Initialize() error

type DNSNameRedacted ¶

type DNSNameRedacted struct{}

func (*DNSNameRedacted) CheckApplies ¶

func (l *DNSNameRedacted) CheckApplies(c *x509.Certificate) bool

func (*DNSNameRedacted) Execute ¶

func (l *DNSNameRedacted) Execute(c *x509.Certificate) *LintResult

func (*DNSNameRedacted) Initialize ¶

func (l *DNSNameRedacted) Initialize() error

type DNSNameUnderscoreInSLD ¶

type DNSNameUnderscoreInSLD struct{}

func (*DNSNameUnderscoreInSLD) CheckApplies ¶

func (l *DNSNameUnderscoreInSLD) CheckApplies(c *x509.Certificate) bool

func (*DNSNameUnderscoreInSLD) Execute ¶

func (*DNSNameUnderscoreInSLD) Initialize ¶

func (l *DNSNameUnderscoreInSLD) Initialize() error

type DNSNameUnderscoreInTRD ¶

type DNSNameUnderscoreInTRD struct{}

func (*DNSNameUnderscoreInTRD) CheckApplies ¶

func (l *DNSNameUnderscoreInTRD) CheckApplies(c *x509.Certificate) bool

func (*DNSNameUnderscoreInTRD) Execute ¶

func (*DNSNameUnderscoreInTRD) Initialize ¶

func (l *DNSNameUnderscoreInTRD) Initialize() error

type DNSNameValidTLD ¶

type DNSNameValidTLD struct{}

func (*DNSNameValidTLD) CheckApplies ¶

func (l *DNSNameValidTLD) CheckApplies(c *x509.Certificate) bool

func (*DNSNameValidTLD) Execute ¶

func (l *DNSNameValidTLD) Execute(c *x509.Certificate) *LintResult

func (*DNSNameValidTLD) Initialize ¶

func (l *DNSNameValidTLD) Initialize() error

type DNSNameWildcardLeftofPublicSuffix ¶

type DNSNameWildcardLeftofPublicSuffix struct{}

func (*DNSNameWildcardLeftofPublicSuffix) CheckApplies ¶

func (*DNSNameWildcardLeftofPublicSuffix) Execute ¶

func (*DNSNameWildcardLeftofPublicSuffix) Initialize ¶

func (l *DNSNameWildcardLeftofPublicSuffix) Initialize() error

type DNSNameWildcardOnlyInLeftlabel ¶

type DNSNameWildcardOnlyInLeftlabel struct{}

func (*DNSNameWildcardOnlyInLeftlabel) CheckApplies ¶

func (*DNSNameWildcardOnlyInLeftlabel) Execute ¶

func (*DNSNameWildcardOnlyInLeftlabel) Initialize ¶

func (l *DNSNameWildcardOnlyInLeftlabel) Initialize() error

type ExtAiaMarkedCritical ¶

type ExtAiaMarkedCritical struct{}

func (*ExtAiaMarkedCritical) CheckApplies ¶

func (l *ExtAiaMarkedCritical) CheckApplies(cert *x509.Certificate) bool

func (*ExtAiaMarkedCritical) Execute ¶

func (l *ExtAiaMarkedCritical) Execute(cert *x509.Certificate) *LintResult

func (*ExtAiaMarkedCritical) Initialize ¶

func (l *ExtAiaMarkedCritical) Initialize() error

type ExtCertPolicyDuplicate ¶

type ExtCertPolicyDuplicate struct{}

func (*ExtCertPolicyDuplicate) CheckApplies ¶

func (l *ExtCertPolicyDuplicate) CheckApplies(cert *x509.Certificate) bool

func (*ExtCertPolicyDuplicate) Execute ¶

func (*ExtCertPolicyDuplicate) Initialize ¶

func (l *ExtCertPolicyDuplicate) Initialize() error

type ExtCertPolicyExplicitTextNotNFC ¶

type ExtCertPolicyExplicitTextNotNFC struct{}

func (*ExtCertPolicyExplicitTextNotNFC) CheckApplies ¶

func (*ExtCertPolicyExplicitTextNotNFC) Execute ¶

func (*ExtCertPolicyExplicitTextNotNFC) Initialize ¶

func (l *ExtCertPolicyExplicitTextNotNFC) Initialize() error

type ExtCrlDistributionMarkedCritical ¶

type ExtCrlDistributionMarkedCritical struct{}

func (*ExtCrlDistributionMarkedCritical) CheckApplies ¶

func (l *ExtCrlDistributionMarkedCritical) CheckApplies(cert *x509.Certificate) bool

func (*ExtCrlDistributionMarkedCritical) Execute ¶

func (*ExtCrlDistributionMarkedCritical) Initialize ¶

func (l *ExtCrlDistributionMarkedCritical) Initialize() error

type ExtDuplicateExtension ¶

type ExtDuplicateExtension struct{}

func (*ExtDuplicateExtension) CheckApplies ¶

func (l *ExtDuplicateExtension) CheckApplies(cert *x509.Certificate) bool

func (*ExtDuplicateExtension) Execute ¶

func (l *ExtDuplicateExtension) Execute(cert *x509.Certificate) *LintResult

func (*ExtDuplicateExtension) Initialize ¶

func (l *ExtDuplicateExtension) Initialize() error

type ExtFreshestCrlMarkedCritical ¶

type ExtFreshestCrlMarkedCritical struct{}

func (*ExtFreshestCrlMarkedCritical) CheckApplies ¶

func (l *ExtFreshestCrlMarkedCritical) CheckApplies(cert *x509.Certificate) bool

func (*ExtFreshestCrlMarkedCritical) Execute ¶

func (*ExtFreshestCrlMarkedCritical) Initialize ¶

func (l *ExtFreshestCrlMarkedCritical) Initialize() error

type ExtIANCritical ¶

type ExtIANCritical struct{}

func (*ExtIANCritical) CheckApplies ¶

func (l *ExtIANCritical) CheckApplies(cert *x509.Certificate) bool

func (*ExtIANCritical) Execute ¶

func (l *ExtIANCritical) Execute(cert *x509.Certificate) *LintResult

func (*ExtIANCritical) Initialize ¶

func (l *ExtIANCritical) Initialize() error

type ExtSANCriticalWithSubjectDN ¶

type ExtSANCriticalWithSubjectDN struct{}

func (*ExtSANCriticalWithSubjectDN) CheckApplies ¶

func (l *ExtSANCriticalWithSubjectDN) CheckApplies(cert *x509.Certificate) bool

func (*ExtSANCriticalWithSubjectDN) Execute ¶

func (*ExtSANCriticalWithSubjectDN) Initialize ¶

func (l *ExtSANCriticalWithSubjectDN) Initialize() error

type IANDNSNotIA5String ¶

type IANDNSNotIA5String struct{}

func (*IANDNSNotIA5String) CheckApplies ¶

func (l *IANDNSNotIA5String) CheckApplies(c *x509.Certificate) bool

func (*IANDNSNotIA5String) Execute ¶

func (*IANDNSNotIA5String) Initialize ¶

func (l *IANDNSNotIA5String) Initialize() error

type IANDNSNull ¶

type IANDNSNull struct{}

func (*IANDNSNull) CheckApplies ¶

func (l *IANDNSNull) CheckApplies(c *x509.Certificate) bool

func (*IANDNSNull) Execute ¶

func (l *IANDNSNull) Execute(c *x509.Certificate) *LintResult

func (*IANDNSNull) Initialize ¶

func (l *IANDNSNull) Initialize() error

type IANDNSPeriod ¶

type IANDNSPeriod struct{}

func (*IANDNSPeriod) CheckApplies ¶

func (l *IANDNSPeriod) CheckApplies(c *x509.Certificate) bool

func (*IANDNSPeriod) Execute ¶

func (l *IANDNSPeriod) Execute(c *x509.Certificate) *LintResult

func (*IANDNSPeriod) Initialize ¶

func (l *IANDNSPeriod) Initialize() error

type IANEmail ¶

type IANEmail struct{}

func (*IANEmail) CheckApplies ¶

func (l *IANEmail) CheckApplies(c *x509.Certificate) bool

func (*IANEmail) Execute ¶

func (l *IANEmail) Execute(c *x509.Certificate) *LintResult

func (*IANEmail) Initialize ¶

func (l *IANEmail) Initialize() error

type IANEmptyName ¶

type IANEmptyName struct{}

func (*IANEmptyName) CheckApplies ¶

func (l *IANEmptyName) CheckApplies(c *x509.Certificate) bool

func (*IANEmptyName) Execute ¶

func (l *IANEmptyName) Execute(c *x509.Certificate) *LintResult

func (*IANEmptyName) Initialize ¶

func (l *IANEmptyName) Initialize() error

type IANNoEntry ¶

type IANNoEntry struct{}

func (*IANNoEntry) CheckApplies ¶

func (l *IANNoEntry) CheckApplies(c *x509.Certificate) bool

func (*IANNoEntry) Execute ¶

func (l *IANNoEntry) Execute(c *x509.Certificate) *LintResult

func (*IANNoEntry) Initialize ¶

func (l *IANNoEntry) Initialize() error

type IANPubSuffix ¶

type IANPubSuffix struct{}

func (*IANPubSuffix) CheckApplies ¶

func (l *IANPubSuffix) CheckApplies(c *x509.Certificate) bool

func (*IANPubSuffix) Execute ¶

func (l *IANPubSuffix) Execute(c *x509.Certificate) *LintResult

func (*IANPubSuffix) Initialize ¶

func (l *IANPubSuffix) Initialize() error

type IANSpace ¶

type IANSpace struct{}

func (*IANSpace) CheckApplies ¶

func (l *IANSpace) CheckApplies(c *x509.Certificate) bool

func (*IANSpace) Execute ¶

func (l *IANSpace) Execute(c *x509.Certificate) *LintResult

func (*IANSpace) Initialize ¶

func (l *IANSpace) Initialize() error

type IANURIFQDNOrIP ¶

type IANURIFQDNOrIP struct{}

func (*IANURIFQDNOrIP) CheckApplies ¶

func (l *IANURIFQDNOrIP) CheckApplies(c *x509.Certificate) bool

func (*IANURIFQDNOrIP) Execute ¶

func (l *IANURIFQDNOrIP) Execute(c *x509.Certificate) *LintResult

func (*IANURIFQDNOrIP) Initialize ¶

func (l *IANURIFQDNOrIP) Initialize() error

type IANURIFormat ¶

type IANURIFormat struct{}

func (*IANURIFormat) CheckApplies ¶

func (l *IANURIFormat) CheckApplies(c *x509.Certificate) bool

func (*IANURIFormat) Execute ¶

func (l *IANURIFormat) Execute(c *x509.Certificate) *LintResult

func (*IANURIFormat) Initialize ¶

func (l *IANURIFormat) Initialize() error

type IANURIIA5String ¶

type IANURIIA5String struct{}

func (*IANURIIA5String) CheckApplies ¶

func (l *IANURIIA5String) CheckApplies(c *x509.Certificate) bool

func (*IANURIIA5String) Execute ¶

func (l *IANURIIA5String) Execute(c *x509.Certificate) *LintResult

func (*IANURIIA5String) Initialize ¶

func (l *IANURIIA5String) Initialize() error

type IDNMalformedUnicode ¶

type IDNMalformedUnicode struct{}

func (*IDNMalformedUnicode) CheckApplies ¶

func (l *IDNMalformedUnicode) CheckApplies(c *x509.Certificate) bool

func (*IDNMalformedUnicode) Execute ¶

func (*IDNMalformedUnicode) Initialize ¶

func (l *IDNMalformedUnicode) Initialize() error

type IDNNotNFC ¶

type IDNNotNFC struct{}

func (*IDNNotNFC) CheckApplies ¶

func (l *IDNNotNFC) CheckApplies(c *x509.Certificate) bool

func (*IDNNotNFC) Execute ¶

func (l *IDNNotNFC) Execute(c *x509.Certificate) *LintResult

func (*IDNNotNFC) Initialize ¶

func (l *IDNNotNFC) Initialize() error

type InhibitAnyPolicyNotCritical ¶

type InhibitAnyPolicyNotCritical struct{}

func (*InhibitAnyPolicyNotCritical) CheckApplies ¶

func (l *InhibitAnyPolicyNotCritical) CheckApplies(cert *x509.Certificate) bool

func (*InhibitAnyPolicyNotCritical) Execute ¶

func (*InhibitAnyPolicyNotCritical) Initialize ¶

func (l *InhibitAnyPolicyNotCritical) Initialize() error

type InvalidCertificateVersion ¶

type InvalidCertificateVersion struct{}

func (*InvalidCertificateVersion) CheckApplies ¶

func (l *InvalidCertificateVersion) CheckApplies(cert *x509.Certificate) bool

func (*InvalidCertificateVersion) Execute ¶

func (*InvalidCertificateVersion) Initialize ¶

func (l *InvalidCertificateVersion) Initialize() error

type IssuerDNCountryNotPrintableString ¶

type IssuerDNCountryNotPrintableString struct{}

func (*IssuerDNCountryNotPrintableString) CheckApplies ¶

func (*IssuerDNCountryNotPrintableString) Execute ¶

func (*IssuerDNCountryNotPrintableString) Initialize ¶

func (l *IssuerDNCountryNotPrintableString) Initialize() error

type IssuerDNLeadingSpace ¶

type IssuerDNLeadingSpace struct{}

func (*IssuerDNLeadingSpace) CheckApplies ¶

func (l *IssuerDNLeadingSpace) CheckApplies(c *x509.Certificate) bool

func (*IssuerDNLeadingSpace) Execute ¶

func (*IssuerDNLeadingSpace) Initialize ¶

func (l *IssuerDNLeadingSpace) Initialize() error

type IssuerDNTrailingSpace ¶

type IssuerDNTrailingSpace struct{}

func (*IssuerDNTrailingSpace) CheckApplies ¶

func (l *IssuerDNTrailingSpace) CheckApplies(c *x509.Certificate) bool

func (*IssuerDNTrailingSpace) Execute ¶

func (*IssuerDNTrailingSpace) Initialize ¶

func (l *IssuerDNTrailingSpace) Initialize() error

type IssuerRDNHasMultipleAttribute ¶

type IssuerRDNHasMultipleAttribute struct{}

func (*IssuerRDNHasMultipleAttribute) CheckApplies ¶

func (l *IssuerRDNHasMultipleAttribute) CheckApplies(c *x509.Certificate) bool

func (*IssuerRDNHasMultipleAttribute) Execute ¶

func (*IssuerRDNHasMultipleAttribute) Initialize ¶

func (l *IssuerRDNHasMultipleAttribute) Initialize() error

type Lint ¶

type Lint struct {

	// Name is a lowercase underscore-separated string describing what a given
	// Lint checks. If Name beings with "w", the lint MUST NOT return Error, only
	// Warn. If Name beings with "e", the Lint MUST NOT return Warn, only Error.
	Name string `json:"name,omitempty"`

	// A human-readable description of what the Lint checks. Usually copied
	// directly from the CA/B Baseline Requirements or RFC 5280.
	Description string `json:"description,omitempty"`

	// The source of the check, e.g. "BRs: 6.1.6" or "RFC 5280: 4.1.2.6".
	Citation string `json:"citation,omitempty"`

	// Programmatic source of the check, BRs, RFC5280, or ZLint
	Source LintSource `json:"-"`

	// Lints automatically returns NE for all certificates where CheckApplies() is
	// true but with NotBefore < EffectiveDate. This check is bypassed if
	// EffectiveDate is zero.
	EffectiveDate time.Time `json:"-"`

	// The implementation of the lint logic.
	Lint LintInterface `json:"-"`
}

A Lint struct represents a single lint, e.g. "e_basic_constraints_not_critical". It contains an implementation of LintInterface.

func (*Lint) CheckEffective ¶

func (l *Lint) CheckEffective(c *x509.Certificate) bool

CheckEffective returns true if c was issued on or after the EffectiveDate. If EffectiveDate is zero, CheckEffective always returns true.

func (*Lint) Execute ¶

func (l *Lint) Execute(cert *x509.Certificate) *LintResult

Execute runs the lint against a certificate. For lints that are sourced from the CA/B Forum Baseline Requirements, we first determine if they are within the purview of the BRs. See LintInterface for details about the other methods called. The ordering is as follows:

CheckApplies() CheckEffective() Execute()

type LintInterface ¶

type LintInterface interface {
	// Initialize runs once per-lint. It is called during RegisterLint().
	Initialize() error

	// CheckApplies runs once per certificate. It returns true if the Lint should
	// run on the given certificate. If CheckApplies returns false, the Lint
	// result is automatically set to NA without calling CheckEffective() or
	// Run().
	CheckApplies(c *x509.Certificate) bool

	// Execute() is the body of the lint. It is called for every certificate for
	// which CheckApplies() returns true.
	Execute(c *x509.Certificate) *LintResult
}

LintInterface is implemented by each Lint.

type LintResult ¶

type LintResult struct {
	Status  LintStatus `json:"result"`
	Details string     `json:"details,omitempty"`
}

LintResult contains a LintStatus, and an optional human-readable description. The output of a lint is a LintResult.

type LintSource ¶

type LintSource int

An Enum to programmatically represent the source of a lint

const (
	UnknownLintSource LintSource = iota
	CABFBaselineRequirements
	RFC5280
	RFC5480
	RFC5891
	ZLint
	AWSLabs
	EtsiEsi // ETSI - Electronic Signatures and Infrastructures (ESI)
	CABFEVGuidelines
	AppleCTPolicy // https://support.apple.com/en-us/HT205280
)

type LintStatus ¶

type LintStatus int

LintStatus is an enum returned by lints inside of a LintResult.

const (
	// Unused / unset LintStatus
	Reserved LintStatus = 0

	// Not Applicable
	NA LintStatus = 1

	// Not Effective
	NE LintStatus = 2

	Pass   LintStatus = 3
	Notice LintStatus = 4
	Warn   LintStatus = 5
	Error  LintStatus = 6
	Fatal  LintStatus = 7
)

Known LintStatus values

func (LintStatus) MarshalJSON ¶

func (e LintStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (LintStatus) String ¶

func (e LintStatus) String() string

String returns the canonical representation of a LintStatus as a string.

func (*LintStatus) UnmarshalJSON ¶

func (e *LintStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

type SANDNSDuplicate ¶

type SANDNSDuplicate struct{}

func (*SANDNSDuplicate) CheckApplies ¶

func (l *SANDNSDuplicate) CheckApplies(c *x509.Certificate) bool

func (*SANDNSDuplicate) Execute ¶

func (l *SANDNSDuplicate) Execute(c *x509.Certificate) *LintResult

func (*SANDNSDuplicate) Initialize ¶

func (l *SANDNSDuplicate) Initialize() error

type SANDNSNotIA5String ¶

type SANDNSNotIA5String struct{}

func (*SANDNSNotIA5String) CheckApplies ¶

func (l *SANDNSNotIA5String) CheckApplies(c *x509.Certificate) bool

func (*SANDNSNotIA5String) Execute ¶

func (*SANDNSNotIA5String) Initialize ¶

func (l *SANDNSNotIA5String) Initialize() error

type SANDNSNull ¶

type SANDNSNull struct{}

func (*SANDNSNull) CheckApplies ¶

func (l *SANDNSNull) CheckApplies(c *x509.Certificate) bool

func (*SANDNSNull) Execute ¶

func (l *SANDNSNull) Execute(c *x509.Certificate) *LintResult

func (*SANDNSNull) Initialize ¶

func (l *SANDNSNull) Initialize() error

type SANDNSPeriod ¶

type SANDNSPeriod struct{}

func (*SANDNSPeriod) CheckApplies ¶

func (l *SANDNSPeriod) CheckApplies(c *x509.Certificate) bool

func (*SANDNSPeriod) Execute ¶

func (l *SANDNSPeriod) Execute(c *x509.Certificate) *LintResult

func (*SANDNSPeriod) Initialize ¶

func (l *SANDNSPeriod) Initialize() error

type SANDNSTooLong ¶

type SANDNSTooLong struct{}

func (*SANDNSTooLong) CheckApplies ¶

func (l *SANDNSTooLong) CheckApplies(c *x509.Certificate) bool

func (*SANDNSTooLong) Execute ¶

func (l *SANDNSTooLong) Execute(c *x509.Certificate) *LintResult

func (*SANDNSTooLong) Initialize ¶

func (l *SANDNSTooLong) Initialize() error

type SANDirName ¶

type SANDirName struct{}

func (*SANDirName) CheckApplies ¶

func (l *SANDirName) CheckApplies(c *x509.Certificate) bool

func (*SANDirName) Execute ¶

func (l *SANDirName) Execute(c *x509.Certificate) *LintResult

func (*SANDirName) Initialize ¶

func (l *SANDirName) Initialize() error

type SANEDI ¶

type SANEDI struct{}

func (*SANEDI) CheckApplies ¶

func (l *SANEDI) CheckApplies(c *x509.Certificate) bool

func (*SANEDI) Execute ¶

func (l *SANEDI) Execute(c *x509.Certificate) *LintResult

func (*SANEDI) Initialize ¶

func (l *SANEDI) Initialize() error

type SANEmptyName ¶

type SANEmptyName struct{}

func (*SANEmptyName) CheckApplies ¶

func (l *SANEmptyName) CheckApplies(c *x509.Certificate) bool

func (*SANEmptyName) Execute ¶

func (l *SANEmptyName) Execute(c *x509.Certificate) *LintResult

func (*SANEmptyName) Initialize ¶

func (l *SANEmptyName) Initialize() error

type SANIsSpaceDNS ¶

type SANIsSpaceDNS struct{}

func (*SANIsSpaceDNS) CheckApplies ¶

func (l *SANIsSpaceDNS) CheckApplies(c *x509.Certificate) bool

func (*SANIsSpaceDNS) Execute ¶

func (l *SANIsSpaceDNS) Execute(c *x509.Certificate) *LintResult

func (*SANIsSpaceDNS) Initialize ¶

func (l *SANIsSpaceDNS) Initialize() error

type SANMissing ¶

type SANMissing struct{}

func (*SANMissing) CheckApplies ¶

func (l *SANMissing) CheckApplies(c *x509.Certificate) bool

func (*SANMissing) Execute ¶

func (l *SANMissing) Execute(c *x509.Certificate) *LintResult

func (*SANMissing) Initialize ¶

func (l *SANMissing) Initialize() error

type SANNoEntry ¶

type SANNoEntry struct{}

func (*SANNoEntry) CheckApplies ¶

func (l *SANNoEntry) CheckApplies(c *x509.Certificate) bool

func (*SANNoEntry) Execute ¶

func (l *SANNoEntry) Execute(c *x509.Certificate) *LintResult

func (*SANNoEntry) Initialize ¶

func (l *SANNoEntry) Initialize() error

type SANOtherName ¶

type SANOtherName struct{}

func (*SANOtherName) CheckApplies ¶

func (l *SANOtherName) CheckApplies(c *x509.Certificate) bool

func (*SANOtherName) Execute ¶

func (l *SANOtherName) Execute(c *x509.Certificate) *LintResult

func (*SANOtherName) Initialize ¶

func (l *SANOtherName) Initialize() error

type SANRegId ¶

type SANRegId struct{}

func (*SANRegId) CheckApplies ¶

func (l *SANRegId) CheckApplies(c *x509.Certificate) bool

func (*SANRegId) Execute ¶

func (l *SANRegId) Execute(c *x509.Certificate) *LintResult

func (*SANRegId) Initialize ¶

func (l *SANRegId) Initialize() error

type SANReservedIP ¶

type SANReservedIP struct{}

func (*SANReservedIP) CheckApplies ¶

func (l *SANReservedIP) CheckApplies(c *x509.Certificate) bool

func (*SANReservedIP) Execute ¶

func (l *SANReservedIP) Execute(c *x509.Certificate) *LintResult

func (*SANReservedIP) Initialize ¶

func (l *SANReservedIP) Initialize() error

type SANRfc822 ¶

type SANRfc822 struct{}

func (*SANRfc822) CheckApplies ¶

func (l *SANRfc822) CheckApplies(c *x509.Certificate) bool

func (*SANRfc822) Execute ¶

func (l *SANRfc822) Execute(c *x509.Certificate) *LintResult

func (*SANRfc822) Initialize ¶

func (l *SANRfc822) Initialize() error

type SANURI ¶

type SANURI struct{}

func (*SANURI) CheckApplies ¶

func (l *SANURI) CheckApplies(c *x509.Certificate) bool

func (*SANURI) Execute ¶

func (l *SANURI) Execute(c *x509.Certificate) *LintResult

func (*SANURI) Initialize ¶

func (l *SANURI) Initialize() error

type SANURIHost ¶

type SANURIHost struct{}

func (*SANURIHost) CheckApplies ¶

func (l *SANURIHost) CheckApplies(c *x509.Certificate) bool

func (*SANURIHost) Execute ¶

func (l *SANURIHost) Execute(c *x509.Certificate) *LintResult

func (*SANURIHost) Initialize ¶

func (l *SANURIHost) Initialize() error

type SANWildCardFirst ¶

type SANWildCardFirst struct{}

func (*SANWildCardFirst) CheckApplies ¶

func (l *SANWildCardFirst) CheckApplies(c *x509.Certificate) bool

func (*SANWildCardFirst) Execute ¶

func (l *SANWildCardFirst) Execute(c *x509.Certificate) *LintResult

func (*SANWildCardFirst) Initialize ¶

func (l *SANWildCardFirst) Initialize() error

type SerialNumberNotPositive ¶

type SerialNumberNotPositive struct{}

func (*SerialNumberNotPositive) CheckApplies ¶

func (l *SerialNumberNotPositive) CheckApplies(cert *x509.Certificate) bool

func (*SerialNumberNotPositive) Execute ¶

func (*SerialNumberNotPositive) Initialize ¶

func (l *SerialNumberNotPositive) Initialize() error

type SubCANameConstraintsNotCritical ¶

type SubCANameConstraintsNotCritical struct{}

func (*SubCANameConstraintsNotCritical) CheckApplies ¶

func (l *SubCANameConstraintsNotCritical) CheckApplies(cert *x509.Certificate) bool

func (*SubCANameConstraintsNotCritical) Execute ¶

func (*SubCANameConstraintsNotCritical) Initialize ¶

func (l *SubCANameConstraintsNotCritical) Initialize() error

type SubjectDNCountryNotPrintableString ¶

type SubjectDNCountryNotPrintableString struct{}

func (*SubjectDNCountryNotPrintableString) CheckApplies ¶

func (*SubjectDNCountryNotPrintableString) Execute ¶

func (*SubjectDNCountryNotPrintableString) Initialize ¶

func (l *SubjectDNCountryNotPrintableString) Initialize() error

type SubjectDNLeadingSpace ¶

type SubjectDNLeadingSpace struct{}

func (*SubjectDNLeadingSpace) CheckApplies ¶

func (l *SubjectDNLeadingSpace) CheckApplies(c *x509.Certificate) bool

func (*SubjectDNLeadingSpace) Execute ¶

func (*SubjectDNLeadingSpace) Initialize ¶

func (l *SubjectDNLeadingSpace) Initialize() error

type SubjectDNSerialNumberMaxLength ¶

type SubjectDNSerialNumberMaxLength struct{}

func (*SubjectDNSerialNumberMaxLength) CheckApplies ¶

func (*SubjectDNSerialNumberMaxLength) Execute ¶

func (*SubjectDNSerialNumberMaxLength) Initialize ¶

func (l *SubjectDNSerialNumberMaxLength) Initialize() error

type SubjectDNSerialNumberNotPrintableString ¶

type SubjectDNSerialNumberNotPrintableString struct{}

func (*SubjectDNSerialNumberNotPrintableString) CheckApplies ¶

func (*SubjectDNSerialNumberNotPrintableString) Execute ¶

func (*SubjectDNSerialNumberNotPrintableString) Initialize ¶

type SubjectDNTrailingSpace ¶

type SubjectDNTrailingSpace struct{}

func (*SubjectDNTrailingSpace) CheckApplies ¶

func (l *SubjectDNTrailingSpace) CheckApplies(c *x509.Certificate) bool

func (*SubjectDNTrailingSpace) Execute ¶

func (*SubjectDNTrailingSpace) Initialize ¶

func (l *SubjectDNTrailingSpace) Initialize() error

type SubjectRDNHasMultipleAttribute ¶

type SubjectRDNHasMultipleAttribute struct{}

func (*SubjectRDNHasMultipleAttribute) CheckApplies ¶

func (*SubjectRDNHasMultipleAttribute) Execute ¶

func (*SubjectRDNHasMultipleAttribute) Initialize ¶

func (l *SubjectRDNHasMultipleAttribute) Initialize() error

Source Files ¶

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL