1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test
shyouhei abae70d6ed SecureRandom should try /dev/urandom first [Bug #9569]
* random.c (InitVM_Random): rename Random.raw_seed to
	  Random.urandom.  A quick search seems there are no practical use
	  of this method than securerandom.rb so I think it's OK to rename
	  but if there are users of it, this hunk is subject to revert.

	* test/ruby/test_rand.rb (TestRand#test_urandom): test for it.

	* lib/securerandom.rb (SecureRandom.gen_random): Prefer OS-
	  provided CSPRNG if available. Otherwise falls back to OpenSSL.
	  Current preference is:

	  1. CSPRNG routine that the OS has; one of
	     - getrandom(2),
	     - arc4random(3), or
	     - CryptGenRandom()
	  2. /dev/urandom device
	  3. OpenSSL's RAND_bytes(3)

	  If none of above random number generators are available, you
	  cannot use this module.  An exception is raised that case.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-20 08:00:00 +00:00
..
-ext- passed block should keep the lambda-ness 2017-01-01 08:22:02 +00:00
base64
benchmark lib/benchmark.rb: Specify frozen_string_literal: true. 2017-01-03 02:00:01 +00:00
bigdecimal bigdecimal: version 1.3.0 2016-12-21 15:35:29 +00:00
cgi
coverage
csv
date
dbm
digest
drb
dtrace
erb
etc
excludes
fiddle test/fiddle/helper: remove special case for x86_64-linux 2017-01-11 23:46:05 +00:00
fileutils lib/fileutils.rb: Specify frozen_string_literal: true. 2017-01-07 02:14:07 +00:00
gdbm
io test_io_console.rb: fix of old CentOS5 2017-01-08 04:04:29 +00:00
irb
json
lib Fix a typo [ci skip] 2017-01-16 12:37:42 +00:00
logger
matrix
minitest
misc
mkmf
monitor
net revert r57323 2017-01-14 09:38:56 +00:00
nkf
objspace adjust indent [ci skip] 2017-01-04 00:30:45 +00:00
open-uri revert r57323 2017-01-14 09:38:56 +00:00
openssl
optparse
ostruct
pathname
psych
rdoc
readline
resolv Made #decode_rdata client to catch errors 2017-01-14 02:26:48 +00:00
rexml
rinda test/rinda/test_rinda: skip multicast tests for unsupported systems 2017-01-11 23:53:05 +00:00
ripper
rss
ruby SecureRandom should try /dev/urandom first [Bug #9569] 2017-01-20 08:00:00 +00:00
rubygems
scanf
sdbm
shell
socket
stringio stringio.c: chomp CR 2016-12-10 08:54:40 +00:00
strscan
syslog
testunit
thread
uri uri/generic.rb: fix exception on non-IP format 2017-01-17 12:54:35 +00:00
webrick
win32ole
yaml lib/pstore.rb: Specify frozen_string_literal: true. 2017-01-17 12:47:38 +00:00
zlib revert r57323 2017-01-14 09:38:56 +00:00
colors
runner.rb
test_abbrev.rb
test_cmath.rb lib/cmath.rb: Specify frozen_string_literal: true. 2017-01-04 05:47:52 +00:00
test_delegate.rb lib/delegate.rb: Specify frozen_string_literal: true. 2017-01-06 02:05:35 +00:00
test_find.rb
test_forwardable.rb
test_ipaddr.rb
test_mathn.rb rational.c: fix for mathn 2016-12-29 09:26:45 +00:00
test_mutex_m.rb
test_observer.rb lib/observer.rb: Specify frozen_string_literal: true. 2017-01-13 12:08:29 +00:00
test_open3.rb
test_pp.rb
test_prettyprint.rb
test_prime.rb
test_pstore.rb lib/pstore.rb: Specify frozen_string_literal: true. 2017-01-17 12:47:38 +00:00
test_pty.rb
test_rbconfig.rb
test_securerandom.rb
test_set.rb
test_shellwords.rb
test_singleton.rb
test_syslog.rb
test_tempfile.rb
test_time.rb
test_timeout.rb
test_tmpdir.rb
test_tracer.rb
test_tsort.rb
test_unicode_normalize.rb
test_weakref.rb
test_win32api.rb