cmd

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CCADB = map[string]*ccadb.Certificate{}

CCADB is an in memory copy of the CCADB retrieved at startup. Used provide a raw, unaltered, form of the CCADB in the UI.

Functions

func BuildDiffReport

func BuildDiffReport(contentDir string)

BuildDiffReport generates and persists to disk a report of the symmetric difference between the CCADB and the TLS Observatory.

func BuildReport

func BuildReport(schema map[string]string, query, dirname string)

BuildReport constructs a report of symmetric differences for all columns in the DB. Results are written to a JSON file named after each individual column.

func BuildReportSite

func BuildReportSite(contentDir, destination string) error

BuildReportSite makes a system to call to the Hugo static site generator to build a copy of the report site.

func MakeDB

func MakeDB(contentDir string)

MakeDB pulls data from the CCADB as well as the TLS Observatory and normalizes them to a standard form. The result is persisted in a SQLite3 database.

func ServeReportSite

func ServeReportSite(contentDir string, port int)

ServeReportSite serves the provided static content over the provdided port in plaintext.

func ServeReportSiteTLS

func ServeReportSiteTLS(contentDir, cert, private string, port int)

ServeReportSiteTLS serves the provided static content over the provided port over TLS using the provided certificate and private key.

func WriteReport

func WriteReport(fr FinalReport, fname string)

WriteReport writes a report to disk as a JSON object.

Types

type FinalReport

type FinalReport struct {
	CCADB       map[string][]string
	Observatory map[string][]string
}

FinalReport is a mapping of differing field values to their offending certificate fingerprints.

func BuildReportForColumn

func BuildReportForColumn(query, column, typ string) FinalReport

BuildReportForColumn constructs a symmetric difference report for a single column.

func NewFinalReport

func NewFinalReport(diffs []SymmetricDiff) FinalReport

NewFinalReport builds a convenient mapping of the symmetric differnce of the CCADB and Observatory.

type SymmetricDiff

type SymmetricDiff struct {
	Fingerprint    string
	CCADB          []string
	Observatory    []string
	CCADBRaw       string
	ObservatoryRaw string
}

SymmetricDiff lists out the entries that the CCADB has that the Observatory does not, as well as the entries that the Observatory has that the CCADB does not.

func NewSymmetricDifference

func NewSymmetricDifference(fingerprint, ccadbS, obsS, typ string) (SymmetricDiff, bool)

NewSymmetricDifference constructs a symmetric difference of the provided CCADB and Obsevatory field of the given fingerprint and field type (single string/CSV).

Jump to

Keyboard shortcuts

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