Documentation ¶
Index ¶
- Variables
- func BuildDiffReport(contentDir string)
- func BuildReport(schema map[string]string, query, dirname string)
- func BuildReportSite(contentDir, destination string) error
- func MakeDB(contentDir string)
- func ServeReportSite(contentDir string, port int)
- func ServeReportSiteTLS(contentDir, cert, private string, port int)
- func WriteReport(fr FinalReport, fname string)
- type FinalReport
- type SymmetricDiff
Constants ¶
This section is empty.
Variables ¶
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 ¶
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 ¶
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 ¶
ServeReportSite serves the provided static content over the provdided port in plaintext.
func ServeReportSiteTLS ¶
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 ¶
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).