google

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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CRLSet

type CRLSet struct {
	Version      string
	IssuerLists  map[string]*IssuerList
	Sequence     int
	NumParents   int
	BlockedSPKIs []string
}

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

func FetchAndParse

func FetchAndParse() (*CRLSet, error)

FetchAndParse - fetch from distribution point, parse to CRLSet struct as defined above

func Parse

func Parse(crlSetReader io.ReadCloser, version string) (*CRLSet, error)

Parse - given a reader for a raw byte stream for a CRLSet, parse the file into a usable CRLSet struct instance. DUE TO THE DIFFICULTY OF RETRIEVING A CRLSET, IT IS HIGHLY RECOMMENDED TO JUST USE THE FetchAndParseCRLSet FUNCTION PROVIDED ABOVE

func (*CRLSet) Check

func (crlSet *CRLSet) Check(cert *x509.Certificate, issuerSPKIHash string) *Entry

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

type CRLSetHeader

type CRLSetHeader struct {
	Sequence     int
	NumParents   int
	BlockedSPKIs []string
}

CRLSetHeader is used to parse the JSON header found in CRLSet files.

type CRXHeader

type CRXHeader struct {
	Magic     [4]byte
	Version   uint32
	HeaderLen uint32
}

CRXHeader reflects the binary header of a CRX file.

type Entry

type Entry struct {
	SerialNumber *big.Int
}

Entry - entry for a single certificate

type IssuerList

type IssuerList struct {
	SPKIHash string // SHA256 of Issuer SPKI
	Entries  []*Entry
}

IssuerList - list of revoked certificate entries for a given issuer

type RawCRLSetSerial

type RawCRLSetSerial struct {
	Len         uint8
	SerialBytes []byte
}

RawCRLSetSerial - structure of certificate serial number in a raw CRLSet entry

type RawEntry

type RawEntry struct {
	SPKIHash   [32]byte // SHA256 of Issuer SPKI
	NumSerials uint32
	Serials    []RawCRLSetSerial
}

RawEntry - structure for a raw CRLSet entry

type ZipReader

type ZipReader []byte

ZipReader is a small wrapper around a []byte which implements ReadAt.

func (ZipReader) ReadAt

func (z ZipReader) ReadAt(p []byte, pos int64) (int, error)

ReadAt - Implementation of ReadAt for ZipReader App

Jump to

Keyboard shortcuts

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