-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Don't shorten OCSP expriation on failed server OCSP fetch #96972
Conversation
Tagging subscribers to this area: @dotnet/ncl, @bartonjs, @vcsjones Issue DetailsFollow up on #96448. Minor bug in the original implementation could potentially drop a still valid OCSP staple if we fail to refresh. The scenario is as follows:
The original intent of setting This PR makes sure we don't shorten the
|
496896a
to
cf5c52d
Compare
cf5c52d
to
13acf6d
Compare
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.
LGTM
src/libraries/System.Net.Security/src/System/Net/Security/SslStreamCertificateContext.Linux.cs
Outdated
Show resolved
Hide resolved
* Don't shorten OCSP expriation on failed server OCSP fetch * Code review feedback
* Don't shorten OCSP expriation on failed server OCSP fetch * Code review feedback
* Add entire issuer chain to trusted X509_STORE when stapling OCSP_Response (#96792) * Add entire issuer chain to trusted X509_STORE when validating OCSP_Response * Code review feedback * More code review feedback * Update src/libraries/System.Net.Security/src/System/Net/Security/SslStreamCertificateContext.Linux.cs Co-authored-by: Jeremy Barton <jbarton@microsoft.com> * Fix compilation * Always include root certificate --------- Co-authored-by: Jeremy Barton <jbarton@microsoft.com> * Recover from failed OCSP download. (#96448) * Recover from failed OCSP check. * Add 5s back-off after failed OCSP querry * Don't shorten OCSP expriation on failed server OCSP fetch (#96972) * Don't shorten OCSP expriation on failed server OCSP fetch * Code review feedback --------- Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
* Recover from failed OCSP download. (#96448) * Recover from failed OCSP check. * Add 5s back-off after failed OCSP querry * Do not OCSP staple invalid OCSP responses * Add entire issuer chain to trusted X509_STORE when validating OCSP_Response Code review feedback More code review feedback Update src/libraries/System.Net.Security/src/System/Net/Security/SslStreamCertificateContext.Linux.cs Co-authored-by: Jeremy Barton <jbarton@microsoft.com> Fix compilation Always include root certificate * Fix compilation * Don't shorten OCSP expriation on failed server OCSP fetch (#96972) * Don't shorten OCSP expriation on failed server OCSP fetch * Code review feedback --------- Co-authored-by: Kevin Jones <kevin@vcsjones.com> Co-authored-by: Carlos Sánchez López <1175054+carlossanlop@users.noreply.github.com>
* Don't shorten OCSP expriation on failed server OCSP fetch * Code review feedback
Follow up on #96448.
Minor bug in the original implementation could potentially drop a still valid OCSP staple if we fail to refresh. The failing scenario is as follows:
_nextDownload
and_ocspExpiration
get set to 5 seconds into the future to facilitate retry with a 5s backoff_ocspExpiration
is in the past and we stop sending the original staple.The original intent of setting
_ocspExpiration
was to avoid immediate refetch if we fail on the very first OCSP fetch.This PR makes sure we don't shorten the
_ocspExpiration