summaryrefslogtreecommitdiff
path: root/test/openssl/test_pkey_dh.rb
diff options
context:
space:
mode:
authorBart de Water <bartdewater@gmail.com>2020-04-19 17:00:01 -0400
committerKazuki Yamaguchi <k@rhe.jp>2020-05-13 15:47:51 +0900
commit3f8665fe0ed5331aa723ddecbf6ad3728931c08d (patch)
treee49acee2ab15e050f7c39ee24c330c7b78970160 /test/openssl/test_pkey_dh.rb
parentfcd257629063a345c48ff2d8057fa8ab910881f2 (diff)
[ruby/openssl] Add Marshal support to PKey objects
https://github.com/ruby/openssl/commit/c4374ff041
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 6397e76d3f..fd2c7a66a9 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)