summaryrefslogtreecommitdiff
path: root/bin-src
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@datawire.io>2018-12-26 17:37:10 -0500
committerLuke Shumaker <lukeshu@datawire.io>2018-12-26 17:37:10 -0500
commit62242411c33d4ed41ccb26524756a7bc69c8bac7 (patch)
treec2e74cc703527fc0db1947ca00b8314aa8358e42 /bin-src
parent0dd93f25fbbbc50105665e647beea70c3b7f2ac5 (diff)
crtsh-pem2html: Avoid setting `href=""`
Diffstat (limited to 'bin-src')
-rw-r--r--bin-src/crtsh-pem2html.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin-src/crtsh-pem2html.go b/bin-src/crtsh-pem2html.go
index f916bf6..bb1e98e 100644
--- a/bin-src/crtsh-pem2html.go
+++ b/bin-src/crtsh-pem2html.go
@@ -57,11 +57,11 @@ var tmpl = template.Must(template.New("pem2html").
</tr>
{{range $cert := .certs}}
<tr {{if $cert.IsValid|not}}class="invalid"{{end}}>
- <td style="background-color: {{$cert.Updated | green}}"><a target="_blank" href="{{$cert.Main.Url}}">{{$cert.Updated | date}}</a></td>
- <td style="background-color: {{(index $cert 0).X509.NotBefore | green}}"><a target="_blank" href="{{$cert.Main.Url}}">{{(index $cert 0).X509.NotBefore | date}}</a></td>
- <td style="background-color: {{(index $cert 0).X509.NotAfter | red }}"><a target="_blank" href="{{$cert.Main.Url}}">{{(index $cert 0).X509.NotAfter | date}}</a></td>
- <td><a target="_blank" href="{{$cert.Main.Url}}">{{(index $cert 0).X509.Subject.CommonName}}</a></td>
- <td><a target="_blank" href="{{$cert.Main.Url}}">{{(index $cert 0).X509.Issuer.Organization}}</a></td>
+ <td style="background-color: {{$cert.Updated | green}}"><a {{if $cert.IsValid}}target="_blank" href="{{$cert.Main.Url}}"{{end}}>{{$cert.Updated | date}}</a></td>
+ <td style="background-color: {{(index $cert 0).X509.NotBefore | green}}"><a {{if $cert.IsValid}}target="_blank" href="{{$cert.Main.Url}}"{{end}}>{{(index $cert 0).X509.NotBefore | date}}</a></td>
+ <td style="background-color: {{(index $cert 0).X509.NotAfter | red }}"><a {{if $cert.IsValid}}target="_blank" href="{{$cert.Main.Url}}"{{end}}>{{(index $cert 0).X509.NotAfter | date}}</a></td>
+ <td><a {{if $cert.IsValid}}target="_blank" href="{{$cert.Main.Url}}"{{end}}>{{(index $cert 0).X509.Subject.CommonName}}</a></td>
+ <td><a {{if $cert.IsValid}}target="_blank" href="{{$cert.Main.Url}}"{{end}}>{{(index $cert 0).X509.Issuer.Organization}}</a></td>
<td>{{range $i, $sct := $cert.Precerts}}
<a target="_blank" href="{{$sct.Url}}">[{{$i}}]</a>
{{end}}</td>