aboutsummaryrefslogtreecommitdiffstats
path: root/test/openssl/test_pkey_dh.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/openssl/test_pkey_dh.rb')
-rw-r--r--test/openssl/test_pkey_dh.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/openssl/test_pkey_dh.rb b/test/openssl/test_pkey_dh.rb
index 6397e76d..fd2c7a66 100644
--- a/test/openssl/test_pkey_dh.rb
+++ b/test/openssl/test_pkey_dh.rb
@@ -74,6 +74,13 @@ class OpenSSL::TestPKeyDH < OpenSSL::PKeyTestCase
assert_equal dh2.g, dh.g
end
+ def test_marshal
+ dh = Fixtures.pkey("dh1024")
+ deserialized = Marshal.load(Marshal.dump(dh))
+
+ assert_equal dh.to_der, deserialized.to_der
+ end
+
private
def assert_equal_params(dh1, dh2)