Skip to content

SSL error "certificate verify failed" #23

@quigybo

Description

@quigybo

I am getting the following error
$ echo test | gist
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

Changing the following suppressed the error, although I doubt it is a proper fix.
diff --git a/lib/gist.rb b/lib/gist.rb
index 6ecc10a..be5b119 100644
--- a/lib/gist.rb
+++ b/lib/gist.rb
@@ -119,7 +119,7 @@ module Gist
end

     http.use_ssl = true
-    http.verify_mode = OpenSSL::SSL::VERIFY_PEER
+    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
     http.ca_file = File.join(File.dirname(__FILE__), "cacert.pem")

     req = Net::HTTP::Post.new(url.path)

Also note the following, even though I am currently using commit 1c27da3 (v2.0.0).
$ gist --version
1.4.0
I think somebody forgot to build gist in commit 83bf891. This shouldn't affect the current issue however, as it was just a version bump from v1.4.0.

Possible relevant info:
$ ruby --version
ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions