From 936a1ca8ed15f2b238152ea72e800207fd8c5e39 Mon Sep 17 00:00:00 2001 From: Andrew Ayer Date: Sun, 22 Jan 2023 13:54:43 -0500 Subject: [PATCH] Remove ctparsewatch --- cmd/ctparsewatch/.gitignore | 1 - cmd/ctparsewatch/main.go | 52 ------------------------------------- 2 files changed, 53 deletions(-) delete mode 100644 cmd/ctparsewatch/.gitignore delete mode 100644 cmd/ctparsewatch/main.go diff --git a/cmd/ctparsewatch/.gitignore b/cmd/ctparsewatch/.gitignore deleted file mode 100644 index 83a544e..0000000 --- a/cmd/ctparsewatch/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/ctparsewatch diff --git a/cmd/ctparsewatch/main.go b/cmd/ctparsewatch/main.go deleted file mode 100644 index d9df557..0000000 --- a/cmd/ctparsewatch/main.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (C) 2016 Opsmate, Inc. -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License, v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. -// -// This software is distributed WITHOUT A WARRANTY OF ANY KIND. -// See the Mozilla Public License for details. - -package main - -import ( - "flag" - "os" - - "software.sslmate.com/src/certspotter" - "software.sslmate.com/src/certspotter/cmd" - "software.sslmate.com/src/certspotter/ct" -) - -func DefaultStateDir() string { - if envVar := os.Getenv("CTPARSEWATCH_STATE_DIR"); envVar != "" { - return envVar - } else { - return cmd.DefaultStateDir("ctparsewatch") - } -} - -var stateDir = flag.String("state_dir", DefaultStateDir(), "Directory for storing state") - -func processEntry(scanner *certspotter.Scanner, entry *ct.LogEntry) { - info := certspotter.EntryInfo{ - LogUri: scanner.LogUri, - Entry: entry, - IsPrecert: certspotter.IsPrecert(entry), - FullChain: certspotter.GetFullChain(entry), - } - - info.CertInfo, info.ParseError = certspotter.MakeCertInfoFromLogEntry(entry) - if info.CertInfo != nil { - info.Identifiers, info.IdentifiersParseError = info.CertInfo.ParseIdentifiers() - } - - if info.HasParseErrors() { - cmd.LogEntry(&info) - } -} - -func main() { - cmd.ParseFlags() - os.Exit(cmd.Main(*stateDir, processEntry)) -}