ruby-changes:43275
From: usa <ko1@a...>
Date: Fri, 10 Jun 2016 15:41:36 +0900 (JST)
Subject: [ruby-changes:43275] usa:r55349 (ruby_2_2): merge revision(s) 53718: [Backport #12320]
usa 2016-06-10 15:41:31 +0900 (Fri, 10 Jun 2016) New Revision: 55349 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55349 Log: merge revision(s) 53718: [Backport #12320] Skip SHA from test_digest_constants for LibreSSL 2.3 The first one of ruby/openssl#40 https://github.com/ruby/openssl/issues/40#issuecomment-159839338 Modified directories: branches/ruby_2_2/ Modified files: branches/ruby_2_2/test/openssl/test_digest.rb branches/ruby_2_2/version.h Index: ruby_2_2/test/openssl/test_digest.rb =================================================================== --- ruby_2_2/test/openssl/test_digest.rb (revision 55348) +++ ruby_2_2/test/openssl/test_digest.rb (revision 55349) @@ -57,7 +57,10 @@ class OpenSSL::TestDigest < Test::Unit:: https://github.com/ruby/ruby/blob/trunk/ruby_2_2/test/openssl/test_digest.rb#L57 end def test_digest_constants - algs = %w(DSS1 MD4 MD5 RIPEMD160 SHA SHA1) + algs = %w(DSS1 MD4 MD5 RIPEMD160 SHA1) + if !libressl? || !version_since([2,3]) + algs += %w(SHA) + end if OpenSSL::OPENSSL_VERSION_NUMBER > 0x00908000 algs += %w(SHA224 SHA256 SHA384 SHA512) end @@ -121,6 +124,14 @@ class OpenSSL::TestDigest < Test::Unit:: https://github.com/ruby/ruby/blob/trunk/ruby_2_2/test/openssl/test_digest.rb#L124 d = OpenSSL::Digest.new(oid.oid) assert_not_nil(d) end + + def libressl? + OpenSSL::OPENSSL_VERSION.include?('LibreSSL') + end + + def version_since(verary) + (OpenSSL::OPENSSL_LIBRARY_VERSION.scan(/\d+/).map(&:to_i) <=> verary) != -1 + end end end Index: ruby_2_2/version.h =================================================================== --- ruby_2_2/version.h (revision 55348) +++ ruby_2_2/version.h (revision 55349) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/version.h#L1 #define RUBY_VERSION "2.2.6" #define RUBY_RELEASE_DATE "2016-06-10" -#define RUBY_PATCHLEVEL 324 +#define RUBY_PATCHLEVEL 325 #define RUBY_RELEASE_YEAR 2016 #define RUBY_RELEASE_MONTH 6 Property changes on: ruby_2_2 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r53718 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/