summaryrefslogtreecommitdiff
path: root/diff.go
diff options
context:
space:
mode:
Diffstat (limited to 'diff.go')
-rw-r--r--diff.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/diff.go b/diff.go
index 83b1d2e..96947b6 100644
--- a/diff.go
+++ b/diff.go
@@ -19,15 +19,15 @@ func handleErr(err error, str string, a ...interface{}) {
}
type Cert struct {
- Url string
- X509 *x509.Certificate
+ Url string
+ X509 *x509.Certificate
}
func (cert Cert) WriteTo(w io.Writer, action string) error {
block := pem.Block{
Type: "CERTIFICATE",
Headers: map[string]string{
- "X-Crt-Sh-Url": cert.Url,
+ "X-Crt-Sh-Url": cert.Url,
"X-Diff-Action": action,
},
Bytes: cert.X509.Raw,
@@ -83,7 +83,7 @@ func readCrtSh(filename string, hosts []string) (map[string]Cert, error) {
if certX509.VerifyHostname(host) == nil {
if old, haveold := ret[host]; !haveold || certX509.NotBefore.After(old.X509.NotBefore) {
ret[host] = Cert{
- Url: certPem.Headers["X-Crt-Sh-Url"],
+ Url: certPem.Headers["X-Crt-Sh-Url"],
X509: certX509,
}
}
@@ -120,7 +120,7 @@ func main() {
if !haveCrtSh {
handleErr(certTLS.WriteTo(os.Stdout, "del"), "Could not encode PEM: %v\n")
- } else if ! certTLS.X509.Equal(certCrtSh.X509) {
+ } else if !certTLS.X509.Equal(certCrtSh.X509) {
handleErr(certTLS.WriteTo(os.Stdout, "del"), "Could not encode PEM: %v\n")
handleErr(certCrtSh.WriteTo(os.Stdout, "add"), "Could not encode PEM: %v\n")
} else {