Description
Scott, I suggest adding a certificate expiration check to our project. I.e., if the certificate expired at the current UTC +TZ time on the server, then the icon changes in the "Status" column in the "Status" table, the label changes to red in the "Expiration" column, and a button appears in the "Certificates" column delete.
I guess need to introduce a function .Expiration which will check the validity of the certificate.
Roughly what it looks like in certificate.html
{{if eq .Revocation .Expiration ""}}
<td>
<img src="/static/img/check-circle-fill.svg" width="16" height="16" alt="Valid">
</td>
{{else}}
<td>
<img src="/static/img/x-circle-fill.svg" width="16" height="16" alt="Invalid">
</td>
{{end}}
{{if eq .Revocation .Expiration ""}}
<td>
<span class="label label-success">{{ dateformat .ExpirationT "2006-01-02 15:04"}}</span>
</td>
{{else}}
<td>
<span class="label label-danger">{{ dateformat .ExpirationT "2006-01-02 15:04"}}</span>
</td>
{{end}}
{{if eq .Revocation .Expiration ""}}
<td></td>
{{else}}
<td>
<a class="btn btn-danger btn-sm" href="{{urlfor "CertificatesController.Remove" ":key" .Details.Name ":serial" .Serial}}">Remove</a>
</td>
{{end}}
Also, need the "Remove" button to delete all files associated with the given configuration name (name.crt, name.key, name.req, serial.pem, name.conf and name.ovpn
). Since the certificate has expired, it is in fact invalid and you cannot connect with it. Accordingly, he does not need to make a revoke and does not need to be added to the recall list either.
What do you think? I think this is a great feature for our project.