Even after setting 'ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE', the exception "Post connection check failed" is raised if the certificate name doesn't match the hostname. A patch is below. I'm a new Ruby programmer; I hope the style is OK. :)
Also, post_connection_check() will fail on a certificate with a wildcard in the hostname (CN field). I haven't implemented a fix for that yet.
--- http-access2.rb.orig 2005-07-14 21:08:58.413213000 -0500
+++ http-access2.rb 2005-07-14 21:27:02.635907000 -0500
@@ -1292,7 +1292,8 @@
@socket = create_ssl_socket(@socket)
connect_ssl_proxy(@socket) if @proxy
@socket.ssl_connect
- unless @socket.post_connection_check(self)
+ if @ssl_config.verify_mode > OpenSSL::SSL::VERIFY_NONE &&
+ @socket.post_connection_check(self)
raise OpenSSL::SSL::SSLError.new("Post connection check failed.")
end
end