diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2016-11-30 21:57:35 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2016-12-22 14:48:30 +0900 |
commit | 4eb4b3297a92149d0a95c674107d091b18fe76af (patch) | |
tree | 637ad45f90371a7eda174f50cd4bc6efcd7ee503 /test/test_pkey_ec.rb | |
parent | c9225b0cbc5d6ce48e7d6172e2010f02b90e22c9 (diff) | |
download | ruby-openssl-4eb4b3297a92149d0a95c674107d091b18fe76af.tar.gz |
Remove support for OpenSSL 0.9.8 and 1.0.0topic/drop-openssl-098-and-100
They are no longer receiving security updates from the OpenSSL
development team since 2015-12.
We have kept basic compatibility until now because RHEL 5 still uses an
(heavily modified) OpenSSL 0.9.8e. The RHEL 5 will reach EOL on 2017-03,
thus it is now safe to assume nobody is still using such old versions of
OpenSSL.
Diffstat (limited to 'test/test_pkey_ec.rb')
-rw-r--r-- | test/test_pkey_ec.rb | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/test/test_pkey_ec.rb b/test/test_pkey_ec.rb index e281f80c..badaff71 100644 --- a/test/test_pkey_ec.rb +++ b/test/test_pkey_ec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: false require_relative 'utils' -if defined?(OpenSSL::TestUtils) && defined?(OpenSSL::PKey::EC) +if defined?(OpenSSL::PKey::EC) class OpenSSL::TestEC < OpenSSL::PKeyTestCase P256 = OpenSSL::TestUtils::TEST_KEY_EC_P256V1 @@ -100,16 +100,9 @@ class OpenSSL::TestEC < OpenSSL::PKeyTestCase key = OpenSSL::PKey::EC.new("prime256v1").generate_key! size = key.group.order.num_bits / 8 + 1 dgst = (1..size).to_a.pack('C*') - begin - sig = key.dsa_sign_asn1(dgst) - # dgst is auto-truncated according to FIPS186-3 after openssl-0.9.8m - assert(key.dsa_verify_asn1(dgst + "garbage", sig)) - rescue OpenSSL::PKey::ECError => e - # just an exception for longer dgst before openssl-0.9.8m - assert_equal('ECDSA_sign: data too large for key size', e.message) - # no need to do following tests - return - end + sig = key.dsa_sign_asn1(dgst) + # dgst is auto-truncated according to FIPS186-3 after openssl-0.9.8m + assert(key.dsa_verify_asn1(dgst + "garbage", sig)) end def test_dh_compute_key |