Validate certificates and update certificate statuses on launch as well.

This commit is contained in:
Eugene Bujak
2019-02-13 11:45:23 +03:00
committed by Eugene Bujak
parent bdec98f18e
commit 571be68733
3 changed files with 29 additions and 13 deletions

View File

@@ -1156,6 +1156,9 @@ func validateCertificates(data tlsConfig) (tlsConfig, error) {
opts.Intermediates = pool
}
// clear out all warnings and statuses
data.tlsConfigStatus = tlsConfigStatus{}
// TODO: save it as a warning rather than error it out -- shouldn't be a big problem
mainCert := parsedCerts[0]
_, err := mainCert.Verify(opts)