title: Ruby SOAP SSL Woes
body: <p>I have a SOAP client in Ruby that I'm trying to get working with a Ruby SOAP server, to no avail. The client works fine over SSL with a Python SOAP server, but not with the Ruby version. Here's what the server looks like:</p>
  
  <pre><code>require 'soap/rpc/standaloneServer'
  require 'soap/rpc/driver'
  require 'rubygems'
  require 'httpclient'
  
  def cert(filename)
    OpenSSL::X509::Certificate.new(File.open("path to cert.cert") { |f|
      f.read
    })
  end
  
  def key(filename)
    OpenSSL::PKey::RSA.new(File.open("path to rsaprivate.key") { |f|
      f.read
    })
  end
  
  class Server &lt; SOAP::RPC::HTTPServer
   ~code snipped for readability~
  end
  
  server = Server.new(:BindAddress =&gt; HelperFunctions.local_ip, :Port =&gt; 1234, :SSLCertificate =&gt; cert("path to cert"), :SSLPrivateKey =&gt; key("path to rsa private key"))
  new_thread = Thread.new { server.start }
  </code></pre>
  
  <p>I've trimmed some of the code out for readability's sake (e.g., I have some methods in there I expose) and it works fine with SSL off. But when the client tries to connect, it sees this:</p>
  
  <pre><code>warning: peer certificate won't be verified in this SSL session
  /usr/lib/ruby/1.8/net/http.rb:567: warning: using default DH parameters.
  /usr/lib/ruby/1.8/net/http.rb:586:in `connect': unknown protocol (OpenSSL::SSL::SSLError)
  </code></pre>
  
  <p>I tried taking some advice from <a href="https://stackoverflow.com/questions/128660/how-can-i-make-rubys-soaprpcdriver-work-with-self-signed-certificates">this post</a> and now I see this message:</p>
  
  <pre><code>/usr/lib/ruby/1.8/soap/httpconfigloader.rb:64:in `set_ssl_config': SSL not supported (NotImplementedError)
  </code></pre>
  
  <p>Any ideas on how to fix this would be greatly appreciated.</p>