diff --git a/ChangeLog b/ChangeLog index 9cdb6686f6..036ff532c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sat Jul 02 08:59:20 2011 Martin Bosslet + + * test/openssl/test_ocsp.rb + * test/openssl/test_x509_cert.rb: Perform SHA-256 tests only if + supported by the available OpenSSL version. Versions < 0.9.8 don't + support it. [ruby-core:37724] + Sat Jul 2 07:17:45 2011 Nobuyoshi Nakada * array.c (rb_ary_reject_bang, rb_ary_delete_if): rejected diff --git a/test/openssl/test_ocsp.rb b/test/openssl/test_ocsp.rb index 19c37e4d32..b42b57d498 100644 --- a/test/openssl/test_ocsp.rb +++ b/test/openssl/test_ocsp.rb @@ -31,7 +31,7 @@ class OpenSSL::TestOCSP < Test::Unit::TestCase cid = OpenSSL::OCSP::CertificateId.new(@cert, @ca_cert, OpenSSL::Digest::SHA256.new) assert_kind_of OpenSSL::OCSP::CertificateId, cid assert_equal @cert.serial, cid.serial - end + end if defined?(OpenSSL::Digest::SHA256) def test_new_ocsp_request request = OpenSSL::OCSP::Request.new diff --git a/test/openssl/test_x509cert.rb b/test/openssl/test_x509cert.rb index 7af00293bf..8b8c51ceeb 100644 --- a/test/openssl/test_x509cert.rb +++ b/test/openssl/test_x509cert.rb @@ -197,7 +197,7 @@ class OpenSSL::TestX509Certificate < Test::Unit::TestCase cert = issue_cert(@ca, @dsa256, 1, Time.now, Time.now+3600, [], nil, nil, OpenSSL::Digest::SHA1.new) assert_equal("dsaWithSHA1", cert.signature_algorithm) - end + end if defined?(OpenSSL::Digest::SHA256) def test_check_private_key cert = issue_cert(@ca, @rsa2048, 1, Time.now, Time.now+3600, [],