0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2025-01-06 22:40:31 -05:00

tls: Avoid nil pointer deref when parsing corrupt OCSP staple files

Fixes #2041
This commit is contained in:
Matthew Holt 2018-02-21 10:53:12 -07:00
parent d3f338ddab
commit 37b291f82c
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5

View file

@ -334,6 +334,7 @@ func DeleteOldStapleFiles() {
if err != nil {
log.Printf("[ERROR] Purging corrupt staple file %s: %v", stapleFile, err)
}
continue
}
if time.Now().After(resp.NextUpdate) {
// response has expired; delete it