r18455 reverted.
[ruby-svn.git] / test / drb / ut_drb_drbssl.rb
blob0a2191e71a823b45a0e0b8eeea3d24f3af4cc383
1 require "#{File.dirname(File.expand_path(__FILE__))}/ut_drb"
2 require 'drb/ssl'
4 if __FILE__ == $0
5   def ARGV.shift
6     it = super()
7     raise "usage: #{$0} <manager-uri> <name>" unless it
8     it
9   end
11   config = Hash.new
12   config[:SSLVerifyMode] = OpenSSL::SSL::VERIFY_PEER
13   config[:SSLVerifyCallback] = lambda{|ok,x509_store|
14     true
15   }
16   config[:SSLCertName] =
17     [ ["C","JP"], ["O","Foo.DRuby.Org"], ["CN", "Sample"] ]
19   DRb::DRbServer.default_argc_limit(8)
20   DRb::DRbServer.default_load_limit(4096)
21   DRb.start_service('drbssl://localhost:0', DRbEx.new, config)
22   es = DRb::ExtServ.new(ARGV.shift, ARGV.shift)
23   DRb.thread.join
24 end