From 9199bec9e85efdcead79cfb19f867e87bb9f48b9 Mon Sep 17 00:00:00 2001 From: rhe Date: Sun, 5 Jun 2016 12:38:34 +0000 Subject: openssl: check existence of RAND_pseudo_bytes() * ext/openssl/extconf.rb: Check if RAND_pseudo_bytes() is usable. It is marked as deprecated in OpenSSL 1.1.0. [ruby-core:75225] [Feature #12324] * ext/openssl/ossl_rand.c: Disable Random.pseudo_bytes if RAND_pseudo_bytes() is unavailable. * test/openssl/test_random.rb: Don't test Random.pseudo_bytes if not defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/openssl/test_random.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/openssl') diff --git a/test/openssl/test_random.rb b/test/openssl/test_random.rb index ca8427f751..6079461920 100644 --- a/test/openssl/test_random.rb +++ b/test/openssl/test_random.rb @@ -8,7 +8,8 @@ class OpenSSL::TestRandom < OpenSSL::TestCase end def test_pseudo_bytes + # deprecated as of OpenSSL 1.1.0 assert_equal("", OpenSSL::Random.pseudo_bytes(0)) assert_equal(12, OpenSSL::Random.pseudo_bytes(12).bytesize) - end + end if OpenSSL::Random.methods.include?(:pseudo_bytes) end if defined?(OpenSSL::TestCase) -- cgit v1.2.3