certstream

package
v0.0.0-...-72c2bb7 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CertStreamEventStream

func CertStreamEventStream(closeCh chan struct{}) (chan *CertStreamEntry, chan error)

Types

type Batcher

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

func NewBatcher

func NewBatcher(userContext am.UserContext, bigDataClient am.BigDataService, batchCount int) *Batcher

func (*Batcher) Add

func (b *Batcher) Add(result *am.CTSubdomain)

func (*Batcher) Count

func (b *Batcher) Count() int32

func (*Batcher) Done

func (b *Batcher) Done()

func (*Batcher) Drain

func (b *Batcher) Drain() map[string]*am.CTSubdomain

func (*Batcher) Init

func (b *Batcher) Init() error

func (*Batcher) InsertBatch

func (b *Batcher) InsertBatch()

type CertListener

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

func New

func New(batcher *Batcher) *CertListener

func (*CertListener) AddETLD

func (l *CertListener) AddETLD(etld string)

func (*CertListener) HasETLD

func (l *CertListener) HasETLD(domain string) (string, bool)

func (*CertListener) Init

func (l *CertListener) Init(closeCh chan struct{}) error

type CertStreamEntry

type CertStreamEntry struct {
	MessageType string `json:"message_type"`
	Data        struct {
		UpdateType string `json:"update_type"`
		LeafCert   struct {
			Subject struct {
				Aggregated string      `json:"aggregated"`
				C          interface{} `json:"C"`
				ST         interface{} `json:"ST"`
				L          interface{} `json:"L"`
				O          interface{} `json:"O"`
				OU         interface{} `json:"OU"`
				CN         string      `json:"CN"`
			} `json:"subject"`
			Extensions struct {
				KeyUsage               string `json:"keyUsage"`
				ExtendedKeyUsage       string `json:"extendedKeyUsage"`
				BasicConstraints       string `json:"basicConstraints"`
				SubjectKeyIdentifier   string `json:"subjectKeyIdentifier"`
				AuthorityKeyIdentifier string `json:"authorityKeyIdentifier"`
				AuthorityInfoAccess    string `json:"authorityInfoAccess"`
				SubjectAltName         string `json:"subjectAltName"`
				CertificatePolicies    string `json:"certificatePolicies"`
			} `json:"extensions"`
			NotBefore    float64  `json:"not_before"`
			NotAfter     float64  `json:"not_after"`
			SerialNumber string   `json:"serial_number"`
			Fingerprint  string   `json:"fingerprint"`
			AsDer        string   `json:"as_der"`
			AllDomains   []string `json:"all_domains"`
		} `json:"leaf_cert"`
		Chain []struct {
			Subject struct {
				Aggregated string      `json:"aggregated"`
				C          string      `json:"C"`
				ST         interface{} `json:"ST"`
				L          interface{} `json:"L"`
				O          string      `json:"O"`
				OU         interface{} `json:"OU"`
				CN         string      `json:"CN"`
			} `json:"subject"`
			Extensions struct {
				BasicConstraints       string `json:"basicConstraints,omitempty"`
				KeyUsage               string `json:"keyUsage,omitempty"`
				AuthorityInfoAccess    string `json:"authorityInfoAccess,omitempty"`
				AuthorityKeyIdentifier string `json:"authorityKeyIdentifier,omitempty"`
				CertificatePolicies    string `json:"certificatePolicies,omitempty"`
				CrlDistributionPoints  string `json:"crlDistributionPoints,omitempty"`
				SubjectKeyIdentifier   string `json:"subjectKeyIdentifier,omitempty"`
			} `json:"extensions,omitempty"`
			NotBefore    float64 `json:"not_before"`
			NotAfter     float64 `json:"not_after"`
			SerialNumber string  `json:"serial_number"`
			Fingerprint  string  `json:"fingerprint"`
			AsDer        string  `json:"as_der"`
		} `json:"chain"`
		CertIndex int     `json:"cert_index"`
		Seen      float64 `json:"seen"`
		Source    struct {
			URL  string `json:"url"`
			Name string `json:"name"`
		} `json:"source"`
	} `json:"data"`
}

CertStreamEntry from the certstream service

type Listener

type Listener interface {
	Init(closeCh chan struct{}) error
	AddETLD(etld string)
	HasETLD(domain string) (string, bool)
}

Jump to

Keyboard shortcuts

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