mozilla

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2021 License: Apache-2.0, ISC, MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Schema       time.Time
	Details      EntryDetails
	Enabled      bool
	Issuer       pkix.Name
	SerialNumber *big.Int
	ID           string
	LastModified time.Time
}

Entry - entry for a single certificate

func (*Entry) UnmarshalJSON

func (entry *Entry) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the json.Unmarshaler interface

type EntryDetails

type EntryDetails struct {
	Bug     string    `json:"bug,omitempty"`
	Who     string    `json:"who,omitempty"`
	Why     string    `json:"why,omitempty"`
	Name    string    `json:"name,omitempty"`
	Created time.Time `json:"created,omitempty"`
}

EntryDetails - revocation details for a single entry

type IssuerList

type IssuerList struct {
	Issuer  pkix.Name
	Entries []*Entry
}

IssuerList - list of Entry for a given issuer

type OneCRL

type OneCRL struct {
	IssuerLists map[string]*IssuerList
}

OneCRL - data structure for storing OneCRL data, used by methods below

func Parse

func Parse(raw []byte) (*OneCRL, error)

Parse - given raw bytes of OneCRL, parse and create OneCRL Object

func (*OneCRL) Check

func (c *OneCRL) Check(cert *x509.Certificate) *Entry

Check - Given a parsed OneCRL, check if a given cert is present

func (OneCRL) FindIssuer

func (c OneCRL) FindIssuer(issuer pkix.Name) *IssuerList

FindIssuer - given an issuer pkix.name, find its corresponding IssuerList

type RawEntry

type RawEntry struct {
	Schema       int          `json:"schema"`
	Details      EntryDetails `json:"details"`
	Enabled      bool         `json:"enabled"`
	Issuer       string       `json:"issuerName"`
	SerialNumber string       `json:"serialNumber"`
	ID           string       `json:"id"`
	LastModified int          `json:"last_modified"`
}

RawEntry - structure of a raw oneCRL entry

Jump to

Keyboard shortcuts

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