-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add OCSP status worker #336
Conversation
} | ||
if resp.Status == ocsp.Revoked { | ||
status.RevokedAt = resp.RevokedAt | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The revoked_at
field is still stored here, but it looks to be detected by .IsZero()
, which doesn't really make sense as a revocation time anyway.
The status field is always checked in the printer anyway.
tls_observatory=# select * from analysis where worker_name='ocspStatus' and scan_id=5;
id | scan_id | worker_name | success | output
----+---------+-------------+---------+-----------------------------------------------------
25 | 5 | ocspStatus | t | {"status": 0, "revoked_at": "0001-01-01T00:00:00Z"}
It looks like there's some (stalled) work on a badssl.com example for revoked/expired OCSP. I don't see an example on their main site. |
@adamdecaf Thanks for finishing this! I was trying to find time to complete this, but I've been really busy lately. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works locally and code looks good, just one nit on the printer output.
worker/ocspStatus/ocspStatus.go
Outdated
results = append(results, fmt.Sprintf(" - Revoked at %s\n", result.RevokedAt.Format(time.RFC3339))) | ||
default: | ||
results = append(results, fmt.Sprintf(" - Unknown status code %d\n", result.Status)) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets put everything on a single line like we did for the CAA and CRL workers. The output should be fmt.Sprintf("* OCSP: <status>")
. Also, don't include a newline, the printer does that automatically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jvehent Done!
This builds on #286 and takes the work done there to finish the worker.
Issue: #199