mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
securerandom: fix up r57384
SecureRandom.gen_random_openssl still refers to Random.raw_seed, which is renamed to Random.urandom by r57384. [Bug #9569] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8c44061928
commit
a0acd82f2a
1 changed files with 1 additions and 1 deletions
|
@ -90,7 +90,7 @@ module SecureRandom
|
||||||
unless @pid == pid
|
unless @pid == pid
|
||||||
now = Process.clock_gettime(Process::CLOCK_REALTIME, :nanosecond)
|
now = Process.clock_gettime(Process::CLOCK_REALTIME, :nanosecond)
|
||||||
OpenSSL::Random.random_add([now, @pid, pid].join(""), 0.0)
|
OpenSSL::Random.random_add([now, @pid, pid].join(""), 0.0)
|
||||||
seed = Random.raw_seed(16)
|
seed = Random.urandom(16)
|
||||||
if (seed)
|
if (seed)
|
||||||
OpenSSL::Random.random_add(seed, 16)
|
OpenSSL::Random.random_add(seed, 16)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue