diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2020-04-21 01:17:34 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-21 01:17:34 +0900 |
commit | 2ca54fe46e87f8a14ff9b7c41e21f0c2e013e55e (patch) | |
tree | 8469016ca97290197af6509744abf3924848007d /test/openssl/test_pkey_rsa.rb | |
parent | 1f1641d71f8f84eeb410a8c8c1b5010ab5c49dd6 (diff) | |
parent | c4374ff041440fd07d884711ab9d743baae8ebde (diff) | |
download | ruby-openssl-2ca54fe46e87f8a14ff9b7c41e21f0c2e013e55e.tar.gz |
Merge pull request #363 from bdewater/marshal-pkey
Add Marshal support to PKey objects
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 a9587aa1..36a2a97d 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]) |