Skip to content
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

handle error of OCSP_sendreq_nbio #81

Merged
merged 2 commits into from Feb 17, 2021
Merged

Conversation

kumagi
Copy link
Collaborator

@kumagi kumagi commented Feb 12, 2021

as document says, OCSP_sendreq_nbio returns 3 values.

-1: retry.
0: error.
1: success

Then this logic should handle error returned value to propagate the context to the return value.

@kumagi kumagi added the bug Something isn't working label Feb 12, 2021
@kumagi kumagi self-assigned this Feb 12, 2021
@google-cla google-cla bot added the cla: yes label Feb 12, 2021
@kumagi kumagi merged commit 3b175f0 into master Feb 17, 2021
@kumagi kumagi deleted the handle_OCSP_sendreq_nbio_error branch February 17, 2021 11:20
Copy link
Collaborator

@twifkak twifkak left a comment

Choose a reason for hiding this comment

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

I'm so sorry; I had drafted this reply but I forgot to hit send.

break;
switch (OCSP_sendreq_nbio(dst, octx) {
case -1:
continue;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you add a sleep with exponential backoff and a limit to the number of retries? I'm worried about an edge case that pegs the CPU or hammers the OCSP responder. (See item 5 at https://gist.github.com/sleevi/5efe9ef98961ecfb4da8.)

Copy link
Collaborator

Choose a reason for hiding this comment

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

I filed #82 to track this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants