[前][次][番号順一覧][スレッド一覧]

ruby-changes:42826

From: nagachika <ko1@a...>
Date: Wed, 4 May 2016 02:01:21 +0900 (JST)
Subject: [ruby-changes:42826] nagachika:r54900 (ruby_2_3): merge revision(s) 53718: [Backport #12320]

nagachika	2016-05-04 02:57:57 +0900 (Wed, 04 May 2016)

  New Revision: 54900

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54900

  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_3/
  Modified files:
    branches/ruby_2_3/test/openssl/test_digest.rb
    branches/ruby_2_3/version.h
Index: ruby_2_3/version.h
===================================================================
--- ruby_2_3/version.h	(revision 54899)
+++ ruby_2_3/version.h	(revision 54900)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/version.h#L1
 #define RUBY_VERSION "2.3.2"
 #define RUBY_RELEASE_DATE "2016-05-04"
-#define RUBY_PATCHLEVEL 114
+#define RUBY_PATCHLEVEL 115
 
 #define RUBY_RELEASE_YEAR 2016
 #define RUBY_RELEASE_MONTH 5
Index: ruby_2_3/test/openssl/test_digest.rb
===================================================================
--- ruby_2_3/test/openssl/test_digest.rb	(revision 54899)
+++ ruby_2_3/test/openssl/test_digest.rb	(revision 54900)
@@ -58,7 +58,10 @@ class OpenSSL::TestDigest < Test::Unit:: https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/openssl/test_digest.rb#L58
   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
@@ -122,6 +125,14 @@ class OpenSSL::TestDigest < Test::Unit:: https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/openssl/test_digest.rb#L125
     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

Property changes on: ruby_2_3
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r53718


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]