From 3c33dc8277cb4b5761b9673cf1dc552e82470d2a Mon Sep 17 00:00:00 2001 From: Andrew Ayer Date: Thu, 18 Feb 2016 10:41:55 -0800 Subject: [PATCH] Remove sha1watch --- cmd/sha1watch/main.go | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 cmd/sha1watch/main.go diff --git a/cmd/sha1watch/main.go b/cmd/sha1watch/main.go deleted file mode 100644 index 21163f6..0000000 --- a/cmd/sha1watch/main.go +++ /dev/null @@ -1,34 +0,0 @@ -package main - -import ( - "flag" - "time" - - "github.com/google/certificate-transparency/go" - "github.com/google/certificate-transparency/go/x509" - - "src.agwa.name/ctwatch/cmd" -) - -var stateDir = flag.String("state_dir", cmd.DefaultStateDir("sha1watch"), "Directory for storing state") - -type sha1Matcher struct { } - -func (m sha1Matcher) CertificateMatches(c *x509.Certificate) bool { - return c.NotBefore.After(time.Date(2016, time.January, 1, 0, 0, 0, 0, time.UTC)) && - (c.SignatureAlgorithm == x509.SHA1WithRSA || - c.SignatureAlgorithm == x509.MD5WithRSA || - c.SignatureAlgorithm == x509.MD2WithRSA || - c.SignatureAlgorithm == x509.DSAWithSHA1 || - c.SignatureAlgorithm == x509.ECDSAWithSHA1) -} - -func (m sha1Matcher) PrecertificateMatches(pc *ct.Precertificate) bool { - return m.CertificateMatches(&pc.TBSCertificate) -} - -func main() { - flag.Parse() - - cmd.Main(*stateDir, &sha1Matcher{}) -}