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

gen_random_openssl missing #159

Closed
headius opened this issue Apr 27, 2018 · 1 comment
Closed

gen_random_openssl missing #159

headius opened this issue Apr 27, 2018 · 1 comment
Labels

Comments

@headius
Copy link
Member

headius commented Apr 27, 2018

I'm not sure when it was added, but apparently the openssl library should provide a method gen_random_openssl on SecureRandom, that then gets used as gen_random from then on.

The tests were modified to call the openssl version of the method in ruby/ruby@782b2050b83

MRI's securerandom.rb has the logic to switch to the openssl version of gen_random here: https://github.com/ruby/ruby/blob/7ed3aae2feb91c584c5402dd6f63c145acd1f033/lib/securerandom.rb#L54-L79

JRuby's securerandom has differed for some time due to having a native component based on Java's RNGs.

@kares
Copy link
Member

kares commented May 16, 2018

from what I read gen_random_openssl is an internal method to exist on SecureRandom
... all OpenSSL::Random methods are there. so I believe there's nothing to do here, mostly work for core.
believe its fine tagged as is for now SecureRandom.gen_random_openssl(n) is internal + the SecureRandom impl can handle its initialization just fine by being a wrapper around Java's SecureRandom

@kares kares added the invalid label May 16, 2018
@kares kares closed this as completed Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants