zlint

package module
v3.0.0-...-cfbdf18 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const Version int64 = 3

Variables

This section is empty.

Functions

This section is empty.

Types

type ResultSet

type ResultSet struct {
	Version         int64                       `json:"version"`
	Timestamp       int64                       `json:"timestamp"`
	Results         map[string]*lint.LintResult `json:"lints"`
	NoticesPresent  bool                        `json:"notices_present"`
	WarningsPresent bool                        `json:"warnings_present"`
	ErrorsPresent   bool                        `json:"errors_present"`
	FatalsPresent   bool                        `json:"fatals_present"`
}

ResultSet contains the output of running all lints in a registry against a single certificate.

func LintCertificate

func LintCertificate(c *x509.Certificate) *ResultSet

LintCertificate runs all registered lints on c using default options, producing a ResultSet.

Using LintCertificate(c) is equivalent to calling LintCertificateEx(c, nil).

func LintCertificateEx

func LintCertificateEx(c *x509.Certificate, registry lint.Registry) *ResultSet

LintCertificateEx runs lints from the provided registry on c producing a ResultSet. Providing an explicit registry allows the caller to filter the lints that will be run. (See lint.Registry.Filter())

If registry is nil then the global registry of all lints is used and this function is equivalent to calling LintCertificate(c).

func LintTBSCertificate

func LintTBSCertificate(rawTBSCertificate []byte) *ResultSet

LintTBSCertificate runs all registered lints on rawTBSCertificate using default options, producing a ResultSet.

Using LintTBSCertificate(rawTBSCertificate) is equivalent to calling LintCertificateEx(rawTBSCertificate, nil).

func LintTBSCertificateEx

func LintTBSCertificateEx(rawTBSCertificate []byte, registry lint.Registry) *ResultSet

LintTBSCertificateEx runs lints from the provided registry on rawTBSCertificate producing a ResultSet. Providing an explicit registry allows the caller to filter the lints that will be run. (See lint.Registry.Filter())

If registry is nil then the global registry of all lints is used and this function is equivalent to calling LintTBSCertificate(rawTBSCertificate).

Jump to

Keyboard shortcuts

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