1
0
Fork 0
mirror of https://github.com/Luzifer/promcertcheck.git synced 2024-11-09 16:30:04 +00:00

Only display cert info when a cert was found

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2018-10-01 15:08:27 +02:00
parent 0b62b1cdd8
commit fe43bf2d68
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E
2 changed files with 52 additions and 45 deletions

View file

@ -79,46 +79,47 @@ func (fi bindataFileInfo) Sys() interface{} {
} }
var _bindataDisplayhtml = []byte( var _bindataDisplayhtml = []byte(
"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x94\x56\xdd\x73\xdb\x38\x0e\x7f\xef\x5f\x81\x6a\x26\x93\x36\x13\x89\x76" + "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x56\x6d\x73\xdb\x36\x0c\xfe\xde\x5f\x81\xea\x2e\x97\x36\x17\x89\x76" +
"\xd2\xdc\xf5\x7c\x92\x67\x7a\x69\xe6\x9a\xdd\x36\xed\x36\xd9\xaf\xe9\xf4\x81\x16\x21\x8b\x2e\x45\xaa\x04\xe4\xc4" + "\xd2\x6c\x9d\x27\xf9\xae\x4b\x73\x6b\xb6\x36\xed\x9a\xec\xed\x7a\xfd\x40\x8b\x90\x45\x97\x22\x55\x82\x52\xe2\xb9" +
"\xeb\xe6\x7f\xdf\xa1\xe4\xaf\x38\x4e\xb6\x7d\x91\x0d\x10\xf8\xe1\x9b\x60\xfa\xf4\xf5\xfb\xd3\xab\x3f\x3f\x9c\x41" + "\xfe\xef\x3b\x4a\x7e\x51\x1c\xdb\x6b\xef\xf6\x45\x36\x48\xe0\x01\xf1\x10\x20\x10\x3f\x7e\xf9\xf6\xfc\xe6\xef\x77" +
"\xc9\x95\x19\x3e\x49\xc3\x0f\x18\x69\xc7\x59\x84\x36\x1a\x3e\x01\x48\x4b\x94\x2a\xfc\x01\x48\x2b\x64\x09\x79\x29" + "\x17\x90\xbb\x42\x0d\x1f\xc5\xfe\x07\x14\xd7\xe3\x24\x40\x1d\x0c\x1f\x01\xc4\x39\x72\xe1\xff\x00\xc4\x05\x3a\x0e" +
"\x3d\x21\x67\x51\xc3\x45\xfc\x32\xda\x3c\x2a\x99\xeb\x18\xbf\x36\x7a\x9a\x45\x7f\xc4\xbf\xbe\x8a\x4f\x5d\x55\x4b" + "\x69\xce\x2d\xa1\x4b\x82\xca\x65\xe1\xf3\xa0\xbb\x95\x3b\x57\x86\xf8\xb9\x92\x75\x12\xfc\x15\xfe\xfe\x22\x3c\x37" +
"\xd6\x23\x83\x11\xe4\xce\x32\x5a\xce\xa2\xf3\xb3\x0c\xd5\x18\xef\x68\x5a\x59\x61\x16\x4d\x35\x5e\xd7\xce\xf3\x86" + "\x45\xc9\x9d\x1c\x29\x0c\x20\x35\xda\xa1\x76\x49\x70\x79\x91\xa0\x18\xe3\x3d\x4b\xcd\x0b\x4c\x82\x5a\xe2\x6d\x69" +
"\xf0\xb5\x56\x5c\x66\x0a\xa7\x3a\xc7\xb8\x25\x0e\x41\x5b\xcd\x5a\x9a\x98\x72\x69\x30\xeb\x2f\x81\x9e\xc6\x31\x5c" + "\xac\xeb\x28\xdf\x4a\xe1\xf2\x44\x60\x2d\x53\x0c\x1b\xe1\x18\xa4\x96\x4e\x72\x15\x52\xca\x15\x26\xfd\x25\xd0\xe3" +
"\x95\x08\x72\xe4\xa6\x08\xc7\xd0\x02\xb3\x1c\x13\x1c\x54\x0d\xf1\x01\xe4\xae\x42\x28\xb4\x27\x06\x6d\x81\x4b\x84" + "\x30\x84\x9b\x1c\x81\x8f\x4c\x8d\x70\x0a\x0d\xb0\xe3\x63\x82\xa3\xa2\x22\x77\x04\xa9\x29\x10\x32\x69\xc9\x81\xd4" +
"\x10\xdb\x7f\x41\xda\x19\x38\x2e\xd1\xb7\xf4\xd2\x36\x04\xa5\x4e\xe7\x40\x16\x8c\xfe\x20\xa8\x10\x76\x90\x71\xbc" + "\xe0\x72\x04\x1f\xdb\x8f\xc0\xf5\x14\x8c\xcb\xd1\x36\xf2\xd2\x37\x78\xa3\xd6\xe6\x88\x67\x0e\xed\x91\x37\x21\x6c" +
"\xb0\xca\x9a\x0d\x0e\x4f\xd1\xb3\x2e\x74\x2e\x19\x61\x2a\x8d\x56\x92\xb5\xb3\xe0\x91\x1a\xc3\x94\x8a\x4e\xea\xc9" + "\x21\xc3\x70\xe1\xd5\x49\xa7\x70\x78\x8e\xd6\xc9\x4c\xa6\xdc\x21\xd4\x5c\x49\xc1\x9d\x34\x1a\x2c\x52\xa5\x1c\xc5" +
"\xda\xd1\xff\x39\xc7\xc4\x5e\xd6\x6b\x24\xa3\xed\x17\xf0\x68\xb2\x88\x78\x66\x90\x4a\x44\x8e\xa0\xf4\x58\x64\x91" + "\xac\xd5\x7a\xb4\x3e\xe8\x4f\xc6\x38\x72\x96\x97\x6b\x24\x25\xf5\x27\xb0\xa8\x92\x80\xdc\x54\x21\xe5\x88\x2e\x80" +
"\x10\x95\xbc\xc9\x95\x4d\x46\x4b\xbd\x40\xe4\xae\x12\x2b\x86\x38\x4e\x8e\x93\x13\x91\x13\xad\x79\x49\xa5\x6d\x92" + "\xdc\x62\x96\x04\x8c\x15\xfc\x2e\x15\x3a\x1a\x2d\xed\xbc\x90\x9a\x82\xad\x16\xd8\x69\x74\x1a\x9d\xb1\x94\x68\xbd" +
"\x13\x45\x9b\xa6\xdf\x5c\xbd\x7b\x7b\x02\x54\xea\x0a\xa4\x55\xf0\x11\xa9\x76\x56\x25\x13\x82\xc2\x79\x38\x3f\x7b" + "\x16\x15\x52\x47\x29\x51\xd0\x75\xfd\xea\xe6\xcd\xeb\x33\xa0\x5c\x16\xc0\xb5\x80\xf7\x48\xa5\xd1\x22\x9a\x10\x64" +
"\x09\xd4\xd4\xa1\x0c\xe0\x8a\x85\x30\x1a\xac\xd0\x32\xb5\x0a\x15\x2a\x2d\xe1\x6b\x83\x5e\xe3\x46\x22\x02\xf4\xef" + "\xc6\xc2\xe5\xc5\x73\xa0\xaa\xf4\xd7\x00\x26\x5b\x28\xa3\xc2\x02\xb5\xa3\xc6\xa0\x40\x21\x39\x7c\xae\xd0\x4a\xec" +
"\xaf\x3e\x5e\x9c\x5f\xfc\x7f\xb0\x09\xaa\x1c\x92\xdd\x67\xb8\x76\xfe\x0b\xe8\x02\x66\xae\x81\x50\xe8\xb6\x00\xb5" + "\x10\xe1\xa1\xff\x7c\xf1\xfe\xea\xf2\xea\xe7\x41\x17\x54\x18\x24\x7d\xe8\xe0\xd6\xd8\x4f\x20\x33\x98\x9a\x0a\xfc" +
"\x1c\x23\x4c\xb5\x84\x42\x1b\x1c\x08\x71\x07\xee\x93\x2e\xc0\x30\x9c\x9f\xc1\x7f\x3e\x77\x5c\x80\x94\x72\xaf\x6b" + "\x45\x37\x17\x50\xf2\x31\x42\x2d\x39\x64\x52\xe1\x80\xb1\x7b\x70\x1f\x64\x06\xca\xc1\xe5\x05\xfc\xf0\xb1\x5d\x05" +
"\x06\xf2\x79\x16\x85\x7e\xa3\x81\x10\x8e\x28\x59\xe4\x27\xa4\x24\x34\xf1\x09\x95\x7a\x2a\x8e\x93\x7f\x27\x47\x6b" + "\x88\x29\xb5\xb2\x74\x40\x36\x4d\x02\x9f\x6f\x34\x60\xcc\x10\x45\x0b\x7e\x3c\x25\x3e\x89\xcf\x28\x97\x35\x3b\x8d" +
"\xba\x4d\xc7\x84\xa2\x61\x2a\x3a\x98\x1f\x41\xf5\x5d\x48\xa2\x9f\xbc\x48\x8e\x96\xd4\x03\x88\xe9\xd3\x4f\x68\x95" + "\xbe\x8f\x4e\xd6\x72\x43\xc7\x84\x82\x61\xcc\x5a\x98\x6f\x41\xb5\x6d\x48\xac\x1f\x3d\x8b\x4e\x96\xd2\x0e\xc4\xf8" +
"\x2e\x3e\x77\xe1\xa4\x62\x39\x44\xe9\xc8\xa9\xd9\x42\x46\xe9\x29\xe4\x46\x12\x65\x51\x68\x39\xa9\x2d\xfa\x68\xe5" + "\xf1\x07\xd4\x42\x66\x1f\xdb\x70\x62\xb6\x2c\xa2\x78\x64\xc4\x74\xa1\x23\x64\x0d\xa9\xe2\x44\x49\xe0\x53\x8e\x4b" +
"\xd1\xc6\xa9\x77\xd7\x11\xb4\x3d\x91\x45\x25\xea\x71\xc9\x83\xa3\x5e\x7d\x13\x8c\x2a\x3d\x5d\x94\xf6\xbe\xca\xea" + "\x8d\x36\x58\x9d\xa8\xb3\x6b\xcd\x6d\x00\x4d\x4e\x24\x41\x8e\x72\x9c\xbb\xc1\x49\xaf\xbc\xf3\x4e\x85\xac\x17\x57" +
"\x60\xdb\x96\x89\x2b\x15\xf7\x8f\x56\xb6\xb6\x25\x6a\x69\xd1\x40\xfb\x8d\x15\x16\xb2\x31\x7c\x47\x76\x87\x74\x1c" + "\xfb\xd0\x64\xb5\xb1\xe9\x4b\x85\x85\x08\xfb\x27\x2b\x5f\x9b\x1a\x25\xd7\xa8\xa0\xf9\x86\x02\x33\x5e\x29\x77\x4f" +
"\x02\xd4\x76\xbc\x25\x07\xf0\xf8\x60\xdc\x05\xed\xa2\x79\xdc\x4e\xc8\xdf\x3d\x23\x29\xcb\x91\xc1\xa5\x60\x47\xb4" + "\x77\x8b\x76\xe8\x03\x94\x7a\xbc\xa1\x07\xb0\xbf\x30\xee\x83\xb6\xd1\xec\xf7\xe3\xf9\x7b\xe0\x24\x76\x7c\xa4\x70" +
"\xdf\x98\xd8\xeb\x1a\xd5\x3d\x8d\xa0\xe3\xef\x33\x03\xbb\x1c\xbe\x71\xc4\xa9\xe0\x72\x18\x88\x73\xa2\x06\xfd\x8a" + "\xa9\xd8\x0a\xcd\x37\x24\x67\x65\x89\xe2\x81\x85\xb7\xb1\x0f\x17\xfd\x72\x3e\x7c\x65\xc8\xc5\xcc\xe5\x43\x2f\x5c" +
"\xfc\x2d\xc4\x00\x8d\x65\x6d\x56\xbc\x8f\x6d\x30\x2d\x79\xdf\x8c\xd8\x65\x67\xbe\xd7\xce\x5a\xe9\x88\x0f\x43\x2e" + "\x12\x55\x68\x57\xe2\x1f\x3e\x06\xa8\xb4\x93\x6a\xb5\xf6\xbe\x09\xa6\x11\x1f\xba\x61\xdb\xfc\xcc\x0e\x9a\x5a\xcb" +
"\xc2\x7d\xb4\x48\x09\x90\xf3\x8c\x0a\xf6\x6e\x77\x78\x37\xdf\x0b\x13\xe4\x91\x92\x4b\x96\xdc\x10\x64\x19\xe4\xeb" + "\x0d\xb9\x63\xcf\x85\x7f\x8f\x16\x94\x00\x19\xeb\x50\xc0\xc1\x7c\xcb\xe9\x66\x07\xbe\x82\x2c\x52\x74\xed\xb8\xab" +
"\x0c\xbf\xff\x79\xb7\xda\x83\xd1\xce\xf7\x00\xcd\x63\x88\x67\x37\xb5\xf6\x48\x97\xce\xd9\x47\xa0\x97\x99\xbf\x96" + "\x08\x92\x04\xd2\x35\xc3\x6f\x7f\xdd\x6e\xb6\x33\xda\xd9\x01\xa0\xda\x87\x78\x71\x57\x4a\x8b\x74\x6d\x8c\xde\x03" +
"\xde\xee\x6a\x82\x95\x29\xc2\xef\x40\x51\xd2\x8e\x37\x26\x61\x1b\x24\xcc\xd5\xc3\x28\x6a\x98\xca\xd1\xc8\x43\x7b" + "\xbd\x64\xfe\x96\x5b\xbd\x2d\x09\x56\xae\x08\xbf\x02\x45\x70\x3d\xee\x54\xc2\x26\x88\xaf\xab\xdd\x28\x62\x9b\x19" +
"\xe1\x66\xd1\x7c\xde\xc6\xb6\xd1\x85\xc9\xeb\x8b\xcb\x0b\x59\x21\xc1\x37\x98\x38\x6d\x07\xfb\x87\xb0\x0f\xb7\xb7" + "\xdc\xa3\xae\x9b\x92\x3b\x70\x00\x62\x3e\x1a\x59\x68\x9e\xed\x24\x98\xcd\x36\x0d\xa3\x97\x57\xd7\x57\xbc\x40\x82" +
"\xd1\x70\x3e\x6f\x0b\x02\xb7\xb7\xa9\x08\x18\xc3\x54\xb0\xda\xe5\x45\x67\x67\x07\x74\xd7\x2b\xc9\xa9\xab\x2a\x67" + "\x2f\x30\x31\x52\x0f\x0e\x8f\xe1\x10\xe6\xf3\x60\x38\x9b\x35\xd7\x0a\xf3\x79\xcc\x3c\xc6\x9e\xf3\xec\xe3\x03\x60" +
"\x83\x91\x16\xeb\x07\x41\x2e\x1c\xbf\x0a\xeb\x06\xbe\x01\xeb\x0a\x07\xd1\x51\xaf\xf7\xaf\xb8\xd7\x8f\x7b\x47\xd0" + "\x0d\xb4\x07\x61\x2f\x19\x6c\x17\x1b\x9e\xa6\x5d\x7c\x6c\x89\xb5\x2d\x81\xe8\xdc\x14\x85\xd1\x3e\x6a\x98\xcf\x3b" +
"\x3f\x19\xf4\x5e\x0c\x7a\x27\xf0\xee\xf2\x2a\xfa\x5e\xf0\xae\xb0\xc9\x25\x7b\x6d\xc7\xcf\x9e\x3f\xa2\xf6\x60\xb3" + "\xce\xff\x37\x3f\x57\xc6\xbd\xf0\x8d\x16\xbe\x80\x93\x05\x0e\x82\x93\x5e\xef\xbb\xb0\xd7\x0f\x7b\x27\xd0\x3f\x1b" +
"\xa2\x55\xa1\x5f\xef\x65\x3d\x15\xed\x98\x0d\x7f\x7c\x8e\x0b\xe7\x78\x47\x91\x53\xb9\x58\x78\xcb\x4b\x78\xac\xb9" + "\xf4\x9e\x0d\x7a\x67\xf0\xe6\xfa\x26\xf8\x26\xff\xb3\x4e\x76\x47\xd7\xce\x4a\x3d\x7e\xf2\xb4\xb9\x9e\xed\x66\x3b" +
"\x6c\x46\xed\x05\xfc\xb6\xf9\x4b\x17\xe8\x45\xed\x5d\x15\x5a\x34\x2f\x31\xff\x12\x0d\x3f\x78\x57\x9d\x2e\x49\x98" + "\x2b\x16\xb5\xf0\x45\xfb\x80\xed\x98\x35\x6f\xcd\xf0\xdb\x1f\xb3\xcc\x18\xb7\x25\xd3\x63\xbe\xe8\xfa\xcb\x4e\x34" +
"\xcf\x61\x8a\x9e\xc2\x1d\xd3\xd6\xf1\x1f\x5c\xdb\x62\x6c\x5d\xa8\xeb\xc3\xcd\x83\x76\xd3\x4d\x7e\x69\xd0\xcf\xe0" + "\x96\x2e\xaf\x46\x4d\x17\x7a\x5d\xfd\x23\x33\xb4\xac\xb4\xa6\xf0\x75\x9a\xe6\x98\x7e\x0a\x86\xef\xac\x29\xce\x97" +
"\x99\xc5\x1c\x89\xa4\x9f\xb5\x03\xbd\xda\xea\xfb\x04\x3f\xc9\xa9\xbc\xec\xd6\x4a\x6d\x9a\xb1\xb6\xf4\x7c\xbd\xdd" + "\xa2\x4f\x9d\x1a\x2d\xf9\x87\xb6\x49\xc3\xff\x38\xda\xc6\xc2\x46\x57\x59\x6f\x76\x37\x9a\x76\x3f\xf9\xad\x42\x3b" +
"\x36\xf7\x8d\x10\x72\x22\x6f\x92\xb1\x73\x63\x83\xb2\xd6\xd4\x46\x1b\x78\xc2\xe8\x11\x89\x49\x58\xb5\x33\xd1\x4f" + "\x85\x27\x1a\x53\x24\xe2\x76\xda\xbc\x6a\xab\xd1\xe6\x90\xe0\x17\x5e\xf3\xeb\xb6\xb7\x96\xaa\x1a\x4b\x4d\x4f\xd7" +
"\xfa\xfd\xe4\x78\x41\x3d\xb8\x77\xe2\x18\xce\x6d\x6e\x1a\x85\x20\x8d\x09\xcf\x97\x5a\x1b\x54\x4b\x17\xe0\xd9\x08" + "\x2d\xbe\xdb\x74\x19\xe3\x13\x7e\x17\x8d\x8d\x19\x2b\xe4\xa5\xa4\x26\x5a\xbf\xc6\x94\x1c\x11\x9b\xf8\x79\x63\xca" +
"\x8d\xbb\x7e\x7e\x08\xce\x83\x5e\x08\x6a\xab\xf4\x54\xab\x46\x9a\x76\x0d\x13\x48\x02\x8b\xa8\x50\x3d\xe4\xf0\xf7" + "\xfa\x51\xbf\x1f\x9d\x2e\xa4\x9d\xcd\x37\x0c\xe1\x52\xa7\xaa\x12\x08\x5c\x29\x3f\xc3\x95\x52\xa1\x58\x1e\x01\x9e" +
"\x3e\x46\x26\xdb\x6f\x91\x6d\x97\x53\xd1\x2d\xc4\x54\x74\x0f\xd0\xbf\x03\x00\x00\xff\xff\x68\x98\x69\x6f\x91\x0a" + "\x8c\x50\x99\xdb\xa7\xc7\x60\x2c\xc8\x85\xa2\xd4\x42\xd6\x52\x54\x5c\x35\xb3\x08\x01\x27\xd0\x88\x02\xc5\xae\x03" +
"\x00\x00") "\x7f\xed\x44\x36\xd9\x1c\xc8\x36\x8f\x1c\xb3\x76\x2a\x88\x59\x3b\x85\xff\x1b\x00\x00\xff\xff\xe7\x19\x78\x14\x96" +
"\x0b\x00\x00")
func bindataDisplayhtmlBytes() ([]byte, error) { func bindataDisplayhtmlBytes() ([]byte, error) {
return bindataRead( return bindataRead(
@ -137,10 +138,10 @@ func bindataDisplayhtml() (*asset, error) {
info := bindataFileInfo{ info := bindataFileInfo{
name: "display.html", name: "display.html",
size: 2705, size: 2966,
md5checksum: "", md5checksum: "",
mode: os.FileMode(436), mode: os.FileMode(436),
modTime: time.Unix(1528111037, 0), modTime: time.Unix(1538399498, 0),
} }
a := &asset{bytes: bytes, info: info} a := &asset{bytes: bytes, info: info}

View file

@ -41,9 +41,15 @@
{% else %} {% else %}
<tr class="danger"> <tr class="danger">
{% endif %} {% endif %}
<td><abbr title="{{ res.Certificate.DNSNames | join:', ' }}">{{ host }}</abbr></td> <td>
<td>{{ res.Certificate.Issuer.CommonName }}</td> {% if res.Certificate %}
<td>{{ res.Certificate.NotAfter | time:"2006-01-02 15:04:05 MST" }}</td> <abbr title="{{ res.Certificate.DNSNames | join:', ' }}">{{ host }}</abbr>
{% else %}
{{ host }}
{% endif %}
</td>
<td>{% if res.Certificate %}{{ res.Certificate.Issuer.CommonName }}{% endif %}</td>
<td>{% if res.Certificate %}{{ res.Certificate.NotAfter | time:"2006-01-02 15:04:05 MST" }}{% endif %}</td>
<td>{{ res.Status.String() }}</td> <td>{{ res.Status.String() }}</td>
</tr> </tr>
{% endfor %} {% endfor %}