summaryrefslogtreecommitdiff
path: root/test/openssl/test_pkey_rsa.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/openssl/test_pkey_rsa.rb')
-rw-r--r--test/openssl/test_pkey_rsa.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/openssl/test_pkey_rsa.rb b/test/openssl/test_pkey_rsa.rb
index c3532f637f..49e8ceacd9 100644
--- a/test/openssl/test_pkey_rsa.rb
+++ b/test/openssl/test_pkey_rsa.rb
@@ -294,6 +294,14 @@ AwEAAQ==
assert(key3.private?)
end
+ def test_dup
+ key = OpenSSL::PKey::RSA.generate(256, 17)
+ key2 = key.dup
+ assert_equal key.params, key2.params
+ key2.set_key(key2.n, 3, key2.d)
+ assert_not_equal key.params, key2.params
+ end
+
private
def check_PUBKEY(asn1, key)