oneCRL

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const IssuerPrefix string = "issuer: "
View Source
const SerialPrefix string = "serial: "

Variables

This section is empty.

Functions

func AddEntries

func AddEntries(records *Records, existing *Records, createBug bool, comment string) error

func AddKintoObject

func AddKintoObject(url string, obj interface{}) error

func ByteArrayEquals

func ByteArrayEquals(a []byte, b []byte) bool

func DNToRFC4514

func DNToRFC4514(name string) (string, error)

func LoadJSONFromURL

func LoadJSONFromURL(url string, loader OneCRLLoader) error

func LoadRevocationsFromBug

func LoadRevocationsFromBug(filename string, loader OneCRLLoader) error

func LoadRevocationsTxtFromFile

func LoadRevocationsTxtFromFile(filename string, loader OneCRLLoader) error

func NamesDataMatches

func NamesDataMatches(name1 []byte, name2 []byte) bool

func RFC4514ish

func RFC4514ish(rdns pkix.RDNSequence) string

func SerialToString

func SerialToString(encoded string, separate bool, upper bool) (string, error)

func StringFromIssuerSerial

func StringFromIssuerSerial(issuer string, serial string) string

func StringFromRecord

func StringFromRecord(record Record) string

Types

type KintoMetadata

type KintoMetadata struct {
	User struct {
		Principals []string `json:"principals"`
		Id         string   `json:"id"`
	} `json:"user"`
}

the subset of stuff we actually care about from Kinto metadata

type OneCRLLoader

type OneCRLLoader interface {
	LoadRecord(record Record)
}

type OneCRLUpdate

type OneCRLUpdate struct {
	Data Record `json:"data"`
}

TODO: this looks unecessary - maybe remove

type Record

type Record struct {
	Id           string `json:"id,omitempty"`
	IssuerName   string `json:"issuerName,omitempty"`
	SerialNumber string `json:"serialNumber,omitempty"`
	Subject      string `json:"subject,omitempty"`
	PubKeyHash   string `json:"pubKeyHash,omitempty"`
	Enabled      bool   `json:"enabled"`
	Details      struct {
		Who     string `json:"who"`
		Created string `json:"created"`
		Bug     string `json:"bug"`
		Name    string `json:"name"`
		Why     string `json:"why"`
	} `json:"details"`
}

func (Record) EqualsRecord

func (record Record) EqualsRecord(otherRecord Record) bool

type Records

type Records struct {
	Data []Record `json:"data"`
}

func FetchExistingRevocations

func FetchExistingRevocations(url string) (*Records, error)

type RevocationsTxtData

type RevocationsTxtData struct {
	// contains filtered or unexported fields
}

func (*RevocationsTxtData) LoadRecord

func (r *RevocationsTxtData) LoadRecord(record Record)

func (*RevocationsTxtData) ToRevocationsTxtString

func (r *RevocationsTxtData) ToRevocationsTxtString() string

Jump to

Keyboard shortcuts

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