Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Using insecure option but still getting SSL verification error #73

prekageo opened this Issue · 2 comments

3 participants


While I am using insecure = true, I still get SSL verification errors. Check below:

~ $ moob -t type -v -u user -p pass -m
Trying to authenticate to
Failure: Patron::Error (SSL: certificate subject name 'default certificate' does not match target host name '')

Backtrace to provide in any support request:
/usr/lib/ruby/gems/1.9.1/gems/patron-0.4.18/lib/patron/session.rb:223:in `handle_request'
/usr/lib/ruby/gems/1.9.1/gems/patron-0.4.18/lib/patron/session.rb:223:in `request'
/usr/lib/ruby/gems/1.9.1/gems/patron-0.4.18/lib/patron/session.rb:126:in `get'
/usr/lib/ruby/gems/1.9.1/gems/moob-0.3.12/lib/moob/idrac6.rb:34:in `authenticate'
/usr/lib/ruby/gems/1.9.1/gems/moob-0.3.12/bin/moob:99:in `block in <top (required)>'
/usr/lib/ruby/gems/1.9.1/gems/moob-0.3.12/bin/moob:95:in `each'
/usr/lib/ruby/gems/1.9.1/gems/moob-0.3.12/bin/moob:95:in `<top (required)>'
/usr/bin/moob:23:in `load'
/usr/bin/moob:23:in `<main>'

I fixed it by applying this diff:

diff --git a/ext/patron/session_ext.c b/ext/patron/session_ext.c
index bf98fa6..78255b4 100644
--- a/ext/patron/session_ext.c
+++ b/ext/patron/session_ext.c
@@ -493,7 +493,7 @@ static void set_options_from_request(VALUE self, VALUE request) {
   insecure = rb_iv_get(request, "@insecure");
   if(!NIL_P(insecure)) {
     curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
-    curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 1);
+    curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);

   cacert = rb_iv_get(request, "@cacert");

@prekageo Thanks for the report. I will take a look at this and patch Patron as soon as I get a chance.


Related #74

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.