summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tls-pem2html.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/tls-pem2html.go b/tls-pem2html.go
index 50d5104..be93b44 100644
--- a/tls-pem2html.go
+++ b/tls-pem2html.go
@@ -94,10 +94,10 @@ var tmpl = template.Must(template.New("pem2html").
</tr>
{{range $cert := .certs}}
<tr class="{{$cert.Class}}">
- <td style="background-color: {{$cert.X509.NotBefore | green}}"><a href="{{$cert.Link}}" title="{{$cert.Error}}">{{$cert.X509.NotBefore.Local.Format "2006-01-02"}}</a></td>
- <td style="background-color: {{$cert.X509.NotAfter | red }}"><a href="{{$cert.Link}}" title="{{$cert.Error}}">{{$cert.X509.NotAfter.Local.Format "2006-01-02"}}</a></td>
- <td><a href="{{$cert.Link}}" title="{{$cert.Error}}">{{$cert.X509.Subject.CommonName | html}}</a></td>
- <td><a href="{{$cert.Link}}" title="{{$cert.Error}}">{{$cert.Socket | html}}</a></td>
+ <td style="background-color: {{$cert.X509.NotBefore | green}}"><a href="{{$cert.Url}}" title="{{$cert.Error}}">{{$cert.X509.NotBefore.Local.Format "2006-01-02"}}</a></td>
+ <td style="background-color: {{$cert.X509.NotAfter | red }}"><a href="{{$cert.Url}}" title="{{$cert.Error}}">{{$cert.X509.NotAfter.Local.Format "2006-01-02"}}</a></td>
+ <td><a href="{{$cert.Url}}" title="{{$cert.Error}}">{{$cert.X509.Subject.CommonName | html}}</a></td>
+ <td><a href="{{$cert.Url}}" title="{{$cert.Error}}">{{$cert.Socket | html}}</a></td>
</tr>
{{end}}
</table>
@@ -168,7 +168,7 @@ type Cert struct {
X509 *x509.Certificate
}
-func (cert Cert) Link() string {
+func (cert Cert) Url() string {
return fmt.Sprintf("https://crt.sh/?serial=%036x", cert.X509.SerialNumber)
}