summaryrefslogtreecommitdiff
path: root/test/openssl/test_pkey_dsa.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/openssl/test_pkey_dsa.rb')
-rw-r--r--test/openssl/test_pkey_dsa.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/openssl/test_pkey_dsa.rb b/test/openssl/test_pkey_dsa.rb
index 211c034236..9c29c034d0 100644
--- a/test/openssl/test_pkey_dsa.rb
+++ b/test/openssl/test_pkey_dsa.rb
@@ -230,6 +230,14 @@ YNMbNw==
assert(key3.private?)
end
+ def test_dup
+ key = OpenSSL::PKey::DSA.new(256)
+ key2 = key.dup
+ assert_equal key.params, key2.params
+ key2.set_pqg(key2.p + 1, key2.q, key2.g)
+ assert_not_equal key.params, key2.params
+ end
+
private
def check_sign_verify(digest)