Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
caddy
Commits
a2db3403
Commit
a2db3403
authored
Oct 16, 2017
by
Matthew Holt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tls: Final check of OCSP response validity date before stapling
parent
c6a29117
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
caddytls/crypto.go
caddytls/crypto.go
+7
-0
No files found.
caddytls/crypto.go
View file @
a2db3403
...
...
@@ -151,6 +151,13 @@ func stapleOCSP(cert *Certificate, pemBundle []byte) error {
// the certificate. If the OCSP response was not loaded from
// storage, we persist it for next time.
if
ocspResp
.
Status
==
ocsp
.
Good
{
if
ocspResp
.
NextUpdate
.
After
(
cert
.
NotAfter
)
{
// uh oh, this OCSP response expires AFTER the certificate does, that's kinda bogus.
// it was the reason a lot of Symantec-validated sites (not Caddy) went down
// in October 2017. https://twitter.com/mattiasgeniar/status/919432824708648961
return
fmt
.
Errorf
(
"invalid: OCSP response for %v valid after certificate expiration (%s)"
,
cert
.
Names
,
cert
.
NotAfter
.
Sub
(
ocspResp
.
NextUpdate
))
}
cert
.
Certificate
.
OCSPStaple
=
ocspBytes
cert
.
OCSP
=
ocspResp
if
gotNewOCSP
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment