diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2021-03-21 00:20:04 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2021-10-24 17:24:50 +0900 |
commit | 2d34e85ddfaad673f7c756b215726a304b757215 (patch) | |
tree | cc49ac4e9d43b2985bdc7c140f871383cd6d3882 /test | |
parent | d42bd7fcdb73b8d37f889b6e2dbf8508df7a335d (diff) | |
download | ruby-openssl-2d34e85ddfaad673f7c756b215726a304b757215.tar.gz |
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.
Diffstat (limited to 'test')
-rw-r--r-- | test/openssl/test_bn.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/openssl/test_bn.rb b/test/openssl/test_bn.rb index c36d6b89..3f0622f9 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 |