diff options
author | Bart de Water <[email protected]> | 2020-04-19 17:00:01 -0400 |
---|---|---|
committer | Kazuki Yamaguchi <[email protected]> | 2020-05-13 15:47:51 +0900 |
commit | 3f8665fe0ed5331aa723ddecbf6ad3728931c08d (patch) | |
tree | e49acee2ab15e050f7c39ee24c330c7b78970160 /test/openssl/test_pkey_rsa.rb | |
parent | fcd257629063a345c48ff2d8057fa8ab910881f2 (diff) |
[ruby/openssl] Add Marshal support to PKey objects
https://github.com/ruby/openssl/commit/c4374ff041
Diffstat (limited to 'test/openssl/test_pkey_rsa.rb')
-rw-r--r-- | test/openssl/test_pkey_rsa.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/openssl/test_pkey_rsa.rb b/test/openssl/test_pkey_rsa.rb index a9587aa1a4..36a2a97da3 100644 --- a/test/openssl/test_pkey_rsa.rb +++ b/test/openssl/test_pkey_rsa.rb @@ -443,6 +443,13 @@ class OpenSSL::TestPKeyRSA < OpenSSL::PKeyTestCase assert_not_equal key.params, key2.params end + def test_marshal + key = Fixtures.pkey("rsa2048") + deserialized = Marshal.load(Marshal.dump(key)) + + assert_equal key.to_der, deserialized.to_der + end + private def assert_same_rsa(expected, key) check_component(expected, key, [:n, :e, :d, :p, :q, :dmp1, :dmq1, :iqmp]) |