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

ruby-changes:45808

From: naruse <ko1@a...>
Date: Sun, 12 Mar 2017 03:59:29 +0900 (JST)
Subject: [ruby-changes:45808] naruse:r57881 (ruby_2_4): merge revision(s) 57482: [Backport #13080] [Backport #13170]

naruse	2017-03-12 03:59:22 +0900 (Sun, 12 Mar 2017)

  New Revision: 57881

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

  Log:
    merge revision(s) 57482: [Backport #13080] [Backport #13170]
    
    openssl: import v2.0.3
    
    Import Ruby/OpenSSL 2.0.3. Only bugfixes. The full commit log since
    2.0.2 (imported at r57146) can be found at:
    
      https://github.com/ruby/openssl/compare/v2.0.2...v2.0.3
    
    ----------------------------------------------------------------
    Corey Bonnell (1):
          Fix for ASN1::Constructive 'each' implementation
    
    Kazuki Yamaguchi (10):
          Fix build with static OpenSSL libraries on Windows
           ([ruby-core:78878] [Bug #13080])
          Merge pull request #96 from CBonnell/master
          Merge branch 'topic/windows-static-linking-without-pkg-config' into maint
          appveyor.yml: update OpenSSL version to 1.0.2j
          buffering: fix typo in doc
          test/envutil: fix assert_raise_with_message
          x509: fix OpenSSL::X509::Name#eql?
           ([ruby-core:79310] [Bug #13170])
          ruby-openssl-docker: update versions of Ruby and OpenSSL
          .travis.yml: test with Ruby 2.4
          Ruby/OpenSSL 2.0.3

  Modified directories:
    branches/ruby_2_4/
  Modified files:
    branches/ruby_2_4/ext/openssl/extconf.rb
    branches/ruby_2_4/ext/openssl/lib/openssl/buffering.rb
    branches/ruby_2_4/ext/openssl/openssl.gemspec
    branches/ruby_2_4/ext/openssl/ossl_asn1.c
    branches/ruby_2_4/ext/openssl/ossl_version.h
    branches/ruby_2_4/ext/openssl/ossl_x509name.c
    branches/ruby_2_4/test/openssl/test_asn1.rb
    branches/ruby_2_4/test/openssl/test_x509name.rb
    branches/ruby_2_4/version.h
Index: ruby_2_4/version.h
===================================================================
--- ruby_2_4/version.h	(revision 57880)
+++ ruby_2_4/version.h	(revision 57881)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_4/version.h#L1
 #define RUBY_VERSION "2.4.0"
 #define RUBY_RELEASE_DATE "2017-03-12"
-#define RUBY_PATCHLEVEL 46
+#define RUBY_PATCHLEVEL 47
 
 #define RUBY_RELEASE_YEAR 2017
 #define RUBY_RELEASE_MONTH 3
Index: ruby_2_4/ext/openssl/openssl.gemspec
===================================================================
--- ruby_2_4/ext/openssl/openssl.gemspec	(revision 57880)
+++ ruby_2_4/ext/openssl/openssl.gemspec	(revision 57881)
@@ -1,15 +1,15 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_4/ext/openssl/openssl.gemspec#L1
 # -*- encoding: utf-8 -*-
-# stub: openssl 2.0.2 ruby lib
+# stub: openssl 2.0.3 ruby lib
 # stub: ext/openssl/extconf.rb
 
 Gem::Specification.new do |s|
   s.name = "openssl".freeze
-  s.version = "2.0.2"
+  s.version = "2.0.3"
 
   s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
   s.require_paths = ["lib".freeze]
   s.authors = ["Martin Bosslet".freeze, "SHIBATA Hiroshi".freeze, "Zachary Scott".freeze, "Kazuki Yamaguchi".freeze]
-  s.date = "2016-12-22"
+  s.date = "2017-01-31"
   s.description = "It wraps the OpenSSL library.".freeze
   s.email = ["ruby-core@r...".freeze]
   s.extensions = ["ext/openssl/extconf.rb".freeze]
@@ -19,7 +19,7 @@ Gem::Specification.new do |s| https://github.com/ruby/ruby/blob/trunk/ruby_2_4/ext/openssl/openssl.gemspec#L19
   s.licenses = ["Ruby".freeze]
   s.rdoc_options = ["--main".freeze, "README.md".freeze]
   s.required_ruby_version = Gem::Requirement.new(">= 2.3.0".freeze)
-  s.rubygems_version = "2.6.8".freeze
+  s.rubygems_version = "2.6.10".freeze
   s.summary = "OpenSSL provides SSL, TLS and general purpose cryptography.".freeze
 
   if s.respond_to? :specification_version then
Index: ruby_2_4/ext/openssl/lib/openssl/buffering.rb
===================================================================
--- ruby_2_4/ext/openssl/lib/openssl/buffering.rb	(revision 57880)
+++ ruby_2_4/ext/openssl/lib/openssl/buffering.rb	(revision 57881)
@@ -189,7 +189,7 @@ module OpenSSL::Buffering https://github.com/ruby/ruby/blob/trunk/ruby_2_4/ext/openssl/lib/openssl/buffering.rb#L189
   end
 
   ##
-  # Reads the next "line+ from the stream.  Lines are separated by +eol+.  If
+  # Reads the next "line" from the stream.  Lines are separated by +eol+.  If
   # +limit+ is provided the result will not be longer than the given number of
   # bytes.
   #
@@ -344,7 +344,7 @@ module OpenSSL::Buffering https://github.com/ruby/ruby/blob/trunk/ruby_2_4/ext/openssl/lib/openssl/buffering.rb#L344
   end
 
   ##
-  # Writes +str+ in the non-blocking manner.
+  # Writes +s+ in the non-blocking manner.
   #
   # If there is buffered data, it is flushed first.  This may block.
   #
Index: ruby_2_4/ext/openssl/extconf.rb
===================================================================
--- ruby_2_4/ext/openssl/extconf.rb	(revision 57880)
+++ ruby_2_4/ext/openssl/extconf.rb	(revision 57881)
@@ -37,6 +37,12 @@ have_library("socket", "socket") https://github.com/ruby/ruby/blob/trunk/ruby_2_4/ext/openssl/extconf.rb#L37
 Logging::message "=== Checking for required stuff... ===\n"
 result = pkg_config("openssl") && have_header("openssl/ssl.h")
 unless result
+  if $mswin || $mingw
+    # required for static OpenSSL libraries
+    have_library("gdi32") # OpenSSL <= 1.0.2 (for RAND_screen())
+    have_library("crypt32")
+  end
+
   result = have_header("openssl/ssl.h")
   result &&= %w[crypto libeay32].any? {|lib| have_library(lib, "CRYPTO_malloc")}
   result &&= %w[ssl ssleay32].any? {|lib| have_library(lib, "SSL_new")}
Index: ruby_2_4/ext/openssl/ossl_version.h
===================================================================
--- ruby_2_4/ext/openssl/ossl_version.h	(revision 57880)
+++ ruby_2_4/ext/openssl/ossl_version.h	(revision 57881)
@@ -10,6 +10,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_4/ext/openssl/ossl_version.h#L10
 #if !defined(_OSSL_VERSION_H_)
 #define _OSSL_VERSION_H_
 
-#define OSSL_VERSION "2.0.2"
+#define OSSL_VERSION "2.0.3"
 
 #endif /* _OSSL_VERSION_H_ */
Index: ruby_2_4/ext/openssl/ossl_asn1.c
===================================================================
--- ruby_2_4/ext/openssl/ossl_asn1.c	(revision 57880)
+++ ruby_2_4/ext/openssl/ossl_asn1.c	(revision 57881)
@@ -1291,7 +1291,7 @@ ossl_asn1cons_to_der(VALUE self) https://github.com/ruby/ruby/blob/trunk/ruby_2_4/ext/openssl/ossl_asn1.c#L1291
 static VALUE
 ossl_asn1cons_each(VALUE self)
 {
-    rb_funcall(ossl_asn1_get_value(self), id_each, 0);
+    rb_block_call(ossl_asn1_get_value(self), id_each, 0, 0, 0, 0);
 
     return self;
 }
Index: ruby_2_4/ext/openssl/ossl_x509name.c
===================================================================
--- ruby_2_4/ext/openssl/ossl_x509name.c	(revision 57880)
+++ ruby_2_4/ext/openssl/ossl_x509name.c	(revision 57881)
@@ -375,7 +375,7 @@ ossl_x509name_eql(VALUE self, VALUE othe https://github.com/ruby/ruby/blob/trunk/ruby_2_4/ext/openssl/ossl_x509name.c#L375
     if (!rb_obj_is_kind_of(other, cX509Name))
 	return Qfalse;
 
-    return ossl_x509name_cmp0(self, other) ? Qtrue : Qfalse;
+    return ossl_x509name_cmp0(self, other) == 0 ? Qtrue : Qfalse;
 }
 
 /*
Index: ruby_2_4/test/openssl/test_asn1.rb
===================================================================
--- ruby_2_4/test/openssl/test_asn1.rb	(revision 57880)
+++ ruby_2_4/test/openssl/test_asn1.rb	(revision 57881)
@@ -566,6 +566,13 @@ rEzBQ0F9dUyqQ9gyRg8KHhDfv9HzT1d/rnUZMkoo https://github.com/ruby/ruby/blob/trunk/ruby_2_4/test/openssl/test_asn1.rb#L566
     assert_equal 17, ret[0][6]
   end
 
+  def test_constructive_each
+    data = [OpenSSL::ASN1::Integer.new(0), OpenSSL::ASN1::Integer.new(1)]
+    seq = OpenSSL::ASN1::Sequence.new data
+
+    assert_equal data, seq.entries
+  end
+
   private
 
   def assert_universal(tag, asn1)
Index: ruby_2_4/test/openssl/test_x509name.rb
===================================================================
--- ruby_2_4/test/openssl/test_x509name.rb	(revision 57880)
+++ ruby_2_4/test/openssl/test_x509name.rb	(revision 57881)
@@ -357,6 +357,16 @@ class OpenSSL::TestX509Name < OpenSSL::T https://github.com/ruby/ruby/blob/trunk/ruby_2_4/test/openssl/test_x509name.rb#L357
     assert_equal(expected, name_hash(name))
   end
 
+  def test_equality
+    name0 = OpenSSL::X509::Name.new([["DC", "org"], ["DC", "ruby-lang"], ["CN", "bar.ruby-lang.org"]])
+    name1 = OpenSSL::X509::Name.new([["DC", "org"], ["DC", "ruby-lang"], ["CN", "bar.ruby-lang.org"]])
+    name2 = OpenSSL::X509::Name.new([["DC", "org"], ["DC", "ruby-lang"], ["CN", "baz.ruby-lang.org"]])
+    assert_equal true, name0 == name1
+    assert_equal true, name0.eql?(name1)
+    assert_equal false, name0 == name2
+    assert_equal false, name0.eql?(name2)
+  end
+
   def test_dup
     name = OpenSSL::X509::Name.parse("/CN=ruby-lang.org")
     assert_equal(name.to_der, name.dup.to_der)

Property changes on: ruby_2_4
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r57482


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

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