Skip to content

GODRIVER-2395 Never return errors when attempting to contact OCSP responders.#926

Merged
matthewdale merged 2 commits intomongodb:masterfrom
matthewdale:godriver2395-no-ocsp-errors
May 2, 2022
Merged

GODRIVER-2395 Never return errors when attempting to contact OCSP responders.#926
matthewdale merged 2 commits intomongodb:masterfrom
matthewdale:godriver2395-no-ocsp-errors

Conversation

@matthewdale
Copy link
Copy Markdown
Contributor

@matthewdale matthewdale commented Apr 26, 2022

GODRIVER-2395

Currently, the OCSP certificate status fetching code in the Go Driver (run when the certificate status is not stapled to the certificate) will return an error if the passed-in Context is cancelled or passes its deadline (see here). However, the OCSP spec describes that drivers should "soft fail" (i.e. fail to return a conclusive status but also not return any errors) anytime the OCSP responders are unreachable for any reason.

Update the OCSP certificate status fetching code to never return errors.

@matthewdale matthewdale force-pushed the godriver2395-no-ocsp-errors branch from 4fc854e to 6271dc5 Compare April 26, 2022 22:42
@matthewdale matthewdale requested a review from qingyang-hu April 26, 2022 22:46
Copy link
Copy Markdown
Contributor

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Nice simplification of the five second timeout.

Comment thread x/mongo/driver/ocsp/ocsp_test.go Outdated
Copy link
Copy Markdown
Contributor

@benjirewis benjirewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, nice new tests!

Comment thread x/mongo/driver/ocsp/ocsp.go Outdated
Comment thread x/mongo/driver/ocsp/ocsp.go Outdated
matthewdale and others added 2 commits April 29, 2022 09:51
@matthewdale matthewdale force-pushed the godriver2395-no-ocsp-errors branch from 8e5a1ee to 815e46a Compare April 29, 2022 16:51
@matthewdale
Copy link
Copy Markdown
Contributor Author

I added all the OCSP tests to the Evergreen run. All failures are for server v5.0, which are unrelated to this change, or for the Windows OCSP build, which fails for unrelated reasons. Merging.

@matthewdale matthewdale merged commit c27db32 into mongodb:master May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants