Track the latest lego OCSP changes

This commit is contained in:
xenolf 2015-10-28 16:35:19 +01:00
parent 7d91cfb512
commit b67543f81c

View file

@ -241,8 +241,8 @@ func autoConfigure(cfg *server.Config, allConfigs []server.Config) []server.Conf
bundleBytes, err := ioutil.ReadFile(storage.SiteCertFile(cfg.Host))
// TODO: Handle these errors better
if err == nil {
ocsp, err := acme.GetOCSPForCert(bundleBytes)
if err == nil {
ocsp, status, err := acme.GetOCSPForCert(bundleBytes)
if err == nil && status == acme.OCSPGood {
cfg.TLS.OCSPStaple = ocsp
}
}