* io.c (rb_open_file): encoding in mode string was ignored if perm is
[ruby-svn.git] / sample / drb / drbssl_c.rb
blob65112f6e7872a89df73988dfee897fe52582ec7c
1 #!/usr/bin/env ruby
3 require 'drb'
4 require 'drb/ssl'
6 there = ARGV.shift || "drbssl://localhost:3456"
8 config = Hash.new
9 config[:SSLVerifyMode] = OpenSSL::SSL::VERIFY_PEER
10 config[:SSLVerifyCallback] = lambda{|ok,x509_store|
11   p [ok, x509_store.error_string]
12   true
15 DRb.start_service(nil,nil,config)
16 h = DRbObject.new(nil, there)
17 while line = gets
18   p h.hello(line.chomp)
19 end