diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2022-09-08 15:37:15 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-08 15:37:15 +0900 |
commit | f54b5e568273a9e29782dfd86f0367721e6cb24a (patch) | |
tree | 66159c0e3e05d1bb93c1728efab3d426357d1ab5 /test | |
parent | 9302d4863d9762c3196b724f605dcd5c7ca84a8b (diff) | |
parent | f6ee0fa4dee17f586eeaa0c1ca533c73c51ca9f7 (diff) | |
download | ruby-openssl-f54b5e568273a9e29782dfd86f0367721e6cb24a.tar.gz |
Merge pull request #541 from rhenium/ky/pkey-ec-export-segfault-regression
pkey/ec: check existence of public key component before exporting
Diffstat (limited to 'test')
-rw-r--r-- | test/openssl/test_pkey_ec.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/openssl/test_pkey_ec.rb b/test/openssl/test_pkey_ec.rb index 23c6c4d4..9a4818de 100644 --- a/test/openssl/test_pkey_ec.rb +++ b/test/openssl/test_pkey_ec.rb @@ -61,8 +61,10 @@ class OpenSSL::TestEC < OpenSSL::PKeyTestCase def test_generate_key ec = OpenSSL::PKey::EC.new("prime256v1") assert_equal false, ec.private? + assert_raise(OpenSSL::PKey::ECError) { ec.to_der } ec.generate_key! assert_equal true, ec.private? + assert_nothing_raised { ec.to_der } end if !openssl?(3, 0, 0) def test_marshal |