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

doc: remove outdated try/catch statements and use const #3087

Closed
wants to merge 8 commits into from
6 changes: 3 additions & 3 deletions doc/api/crypto.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -660,9 +660,9 @@ Generates cryptographically strong pseudo-random data. Usage:
}

NOTE: This will block if there is insufficient entropy, although it should
normally never take longer than a few milliseconds. The only time when this
may conceivably block is right after boot, when the whole system is still
low on entropy.
normally never take longer than a few milliseconds.
Under normal circumstances, the only error thrown from this is from RAND_bytes(), which throws when it doesn't have enough entropy.
However, with CheckEntropy, this will block until the system has enough entropy for the OpenSSL pool.
Copy link
Member

Choose a reason for hiding this comment

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

I don't think that's very enlightening for people not familiar with openssl or the code base. I don't really have suggestions on how to reword it, just that it's not very helpful now (and the part about CheckEntropy() is arguably wrong in a nuanced way.)

Also, please wrap lines at 80 columns.

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps, @JungMinu, you could update the code block instead? The note is mostly correct about the current behavior. Maybe remove the try / catch block in the example?


## Class: Certificate

Expand Down