crl

package
v0.22.1-rc13 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CRL

type CRL struct {
	Version             int                  `json:"version"`
	SignatureAlgorithm  SignatureAlgorithm   `json:"signature_algorithm"`
	Issuer              DistinguishedName    `json:"issuer"`
	ThisUpdate          time.Time            `json:"this_update"`
	NextUpdate          time.Time            `json:"next_update"`
	RevokedCertificates []RevokedCertificate `json:"revoked_certificates"`
	Extensions          []Extension          `json:"extensions,omitempty"`
	Signature           *Signature           `json:"signature"`
	// contains filtered or unexported fields
}

CRL is the JSON representation of a certificate revocation list.

func ParseCRL

func ParseCRL(b []byte) (*CRL, error)

func (*CRL) Verify

func (c *CRL) Verify(ca *x509.Certificate) bool

func (*CRL) VerifySignature added in v0.18.2

func (c *CRL) VerifySignature(ca *x509.Certificate) bool

type DistinguishedName added in v0.23.0

type DistinguishedName 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"`
	ExtraNames         map[string][]interface{} `json:"extra_names,omitempty"`
	// contains filtered or unexported fields
}

DistinguishedName is the JSON representation of the CRL issuer.

func (DistinguishedName) String added in v0.23.0

func (d DistinguishedName) String() string

String returns the one line representation of the distinguished name.

type Extension

type Extension struct {
	Name    string   `json:"-"`
	Details []string `json:"-"`
	// contains filtered or unexported fields
}

func (*Extension) AddDetailf added in v0.22.0

func (e *Extension) AddDetailf(format string, args ...interface{})

func (*Extension) MarshalJSON

func (e *Extension) MarshalJSON() ([]byte, error)

type RevokedCertificate

type RevokedCertificate struct {
	SerialNumber      string      `json:"serial_number"`
	RevocationTime    time.Time   `json:"revocation_time"`
	Extensions        []Extension `json:"extensions,omitempty"`
	SerialNumberBytes []byte      `json:"-"`
}

RevokedCertificate is the JSON representation of a certificate in a CRL.

type Signature

type Signature struct {
	SignatureAlgorithm SignatureAlgorithm `json:"signature_algorithm"`
	Value              []byte             `json:"value"`
	Valid              bool               `json:"valid"`
	Reason             string             `json:"reason,omitempty"`
}

Signature is the JSON representation of a CRL signature.

type SignatureAlgorithm

type SignatureAlgorithm struct {
	Name string `json:"name"`
	OID  string `json:"oid"`
	// contains filtered or unexported fields
}

func (SignatureAlgorithm) String

func (s SignatureAlgorithm) String() string

Jump to

Keyboard shortcuts

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