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

ruby-changes:36318

From: akr <ko1@a...>
Date: Thu, 13 Nov 2014 21:28:27 +0900 (JST)
Subject: [ruby-changes:36318] akr:r48399 (trunk): * test/openssl/ssl_server.rb: Unused file removed.

akr	2014-11-13 21:28:12 +0900 (Thu, 13 Nov 2014)

  New Revision: 48399

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

  Log:
    * test/openssl/ssl_server.rb: Unused file removed.
      It is not used since r16111, Ruby 1.9.1.

  Removed files:
    trunk/test/openssl/ssl_server.rb
  Modified files:
    trunk/ChangeLog
    trunk/test/openssl/utils.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 48398)
+++ ChangeLog	(revision 48399)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Nov 13 21:22:35 2014  Tanaka Akira  <akr@f...>
+
+	* test/openssl/ssl_server.rb: Unused file removed.
+	  It is not used since r16111, Ruby 1.9.1.
+
 Thu Nov 13 18:50:14 2014  Nobuyoshi Nakada  <nobu@r...>
 
 	* eval.c (rb_ensure): remove obsolete prot_tag comment.  patch by
Index: test/openssl/ssl_server.rb
===================================================================
--- test/openssl/ssl_server.rb	(revision 48398)
+++ test/openssl/ssl_server.rb	(revision 48399)
@@ -1,81 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/test/openssl/ssl_server.rb#L0
-require "socket"
-require "thread"
-require "openssl"
-require File.join(File.dirname(__FILE__), "utils.rb")
-
-def get_pem(io=$stdin)
-  buf = ""
-  while line = io.gets
-    if /^-----BEGIN / =~ line
-      buf << line
-      break
-    end
-  end
-  while line = io.gets
-    buf << line
-    if /^-----END / =~ line
-      break
-    end
-  end
-  return buf
-end
-
-def make_key(pem)
-  begin
-    return OpenSSL::PKey::RSA.new(pem)
-  rescue
-    return OpenSSL::PKey::DSA.new(pem)
-  end
-end
-
-ca_cert  = OpenSSL::X509::Certificate.new(get_pem)
-ssl_cert = OpenSSL::X509::Certificate.new(get_pem)
-ssl_key  = make_key(get_pem)
-port = Integer(ARGV.shift)
-verify_mode = Integer(ARGV.shift)
-start_immediately = (/yes/ =~ ARGV.shift)
-
-store = OpenSSL::X509::Store.new
-store.add_cert(ca_cert)
-store.purpose = OpenSSL::X509::PURPOSE_SSL_CLIENT
-ctx = OpenSSL::SSL::SSLContext.new
-ctx.cert_store = store
-#ctx.extra_chain_cert = [ ca_cert ]
-ctx.cert = ssl_cert
-ctx.key = ssl_key
-ctx.verify_mode = verify_mode
-
-Socket.do_not_reverse_lookup = true
-tcps = nil
-100.times{|i|
-  begin
-    tcps = TCPServer.new("0.0.0.0", port+i)
-    port = port + i
-    break
-  rescue Errno::EADDRINUSE
-    next
-  end
-}
-ssls = OpenSSL::SSL::SSLServer.new(tcps, ctx)
-ssls.start_immediately = start_immediately
-
-$stdout.sync = true
-$stdout.puts Process.pid
-$stdout.puts port
-
-loop do
-  ssl = ssls.accept rescue next
-  Thread.start{
-    q = Queue.new
-    th = Thread.start{ ssl.write(q.shift) while true }
-    while line = ssl.gets
-      if line =~ /^STARTTLS$/
-        ssl.accept
-        next
-      end
-      q.push(line)
-    end
-    th.kill if q.empty?
-    ssl.close
-  }
-end
Index: test/openssl/utils.rb
===================================================================
--- test/openssl/utils.rb	(revision 48398)
+++ test/openssl/utils.rb	(revision 48399)
@@ -190,7 +190,6 @@ AQjjxMXhwULlmuR/K+WwlaZPiLIBYalLAZQ7ZbOP https://github.com/ruby/ruby/blob/trunk/test/openssl/utils.rb#L190
 
   class OpenSSL::SSLTestCase < Test::Unit::TestCase
     RUBY = EnvUtil.rubybin
-    SSL_SERVER = File.join(File.dirname(__FILE__), "ssl_server.rb")
     PORT = 20443
     ITERATIONS = ($0 == __FILE__) ? 100 : 10
 
@@ -311,7 +310,7 @@ AQjjxMXhwULlmuR/K+WwlaZPiLIBYalLAZQ7ZbOP https://github.com/ruby/ruby/blob/trunk/test/openssl/utils.rb#L310
           end
           threads.unshift server
 
-          $stderr.printf("%s started: pid=%d port=%d\n", SSL_SERVER, $$, port) if $DEBUG
+          $stderr.printf("SSL server started: pid=%d port=%d\n", $$, port) if $DEBUG
 
           client = Thread.new do
             begin

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

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