diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2017-03-18 17:26:33 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2021-03-16 19:16:10 +0900 |
commit | efad0166c660d565d5e80e862cd9ff9457f8ed03 (patch) | |
tree | 915de0348bf6ac929e15f3decd408f24b6928c9d /test/openssl/test_pkey_dh.rb | |
parent | c157f6e787221bcdbf8b6bb28db1b43578b89d66 (diff) |
[ruby/openssl] pkey: have PKey.read parse PEM-encoded DHParameter
Try PEM_read_bio_Parameters(). Only PEM format is supported at the
moment since corresponding d2i_* functions are not provided by OpenSSL.
https://github.com/ruby/openssl/commit/867e5c021b
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4275
Diffstat (limited to 'test/openssl/test_pkey_dh.rb')
-rw-r--r-- | test/openssl/test_pkey_dh.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/openssl/test_pkey_dh.rb b/test/openssl/test_pkey_dh.rb index fd2c7a66a9..4a05626a12 100644 --- a/test/openssl/test_pkey_dh.rb +++ b/test/openssl/test_pkey_dh.rb @@ -36,6 +36,8 @@ class OpenSSL::TestPKeyDH < OpenSSL::PKeyTestCase EOF key = OpenSSL::PKey::DH.new(pem) assert_same_dh dup_public(dh1024), key + key = OpenSSL::PKey.read(pem) + assert_same_dh dup_public(dh1024), key assert_equal asn1.to_der, dh1024.to_der assert_equal pem, dh1024.export |