summaryrefslogtreecommitdiff
path: root/test/openssl/test_bn.rb
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2021-03-21 00:20:04 +0900
committerKazuki Yamaguchi <k@rhe.jp>2021-10-25 00:40:48 +0900
commite19186707a78e6e739646dac1430dc3066cf9bad (patch)
treee9b4e57519ff65aea0a94f827762f8a4330724ae /test/openssl/test_bn.rb
parent1b5ccc8a0c27273d2f944f9914bcbdda3ad803f7 (diff)
[ruby/openssl] bn: make BN.pseudo_rand{,_range} an alias of BN.rand{,_range}
BN_pseudo_rand() and BN_pseudo_rand_range() are deprecated in OpenSSL 3.0. Since they are identical to their non-'pseudo' version anyway, let's make them alias. https://github.com/ruby/openssl/commit/2d34e85ddf
Diffstat (limited to 'test/openssl/test_bn.rb')
-rw-r--r--test/openssl/test_bn.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/openssl/test_bn.rb b/test/openssl/test_bn.rb
index c36d6b89d8..3f0622f94f 100644
--- a/test/openssl/test_bn.rb
+++ b/test/openssl/test_bn.rb
@@ -248,6 +248,10 @@ class OpenSSL::TestBN < OpenSSL::TestCase
r5 = OpenSSL::BN.rand_range(256)
assert_include(0..255, r5)
}
+
+ # Aliases
+ assert_include(128..255, OpenSSL::BN.pseudo_rand(8))
+ assert_include(0..255, OpenSSL::BN.pseudo_rand_range(256))
end
begin