Closed GoogleCodeExporter closed 9 years ago
Original comment by bobaman@google.com
on 11 Mar 2011 at 7:32
I won't be downgrading SSL verification errors to warnings. However, I will be
exposing more of the internals for configuration to allow developers to make
adjustments as necessary. You may find that using Typhoeus or some other HTTP
stack other than Net::HTTP might be beneficial. The httpadapter gem that the
client uses makes swapping out the HTTP stack pretty trivial. Note that I'm
currently in the process of making some sweeping changes to httpadapter though
(mostly to enable the configuration changes I mentioned) so expect that gem to
be unstable for a bit.
Original comment by bobaman@google.com
on 11 Mar 2011 at 7:38
Hi Bob.
I don't think you can 'blame' the stack. The API call works fine in the first
instance. It is ONLY later on when the google-api-ruby-client code calls
translate in 'execute()' that the wheels fall off.
My guess is the second connection swaps in or uses a variable that has been set
to Nil initialised, or released. Both connections seem to be using SSL, and
only one, the second doesn't work. That's why I'm thinking the stack itself is
OK (besides, lots and lots of code use the Net::HTTP module with little drama).
w
Original comment by William....@gmail.com
on 11 Mar 2011 at 11:57
I just updated the httpadapter gem to allow things like this:
adapter = HTTPAdapter::NetHTTPAdapter.new do |http|
# You should never actually do this. But you could.
http.connection.verify_mode = OpenSSL::SSL::VERIFY_NONE
end
Or this:
adapter = HTTPAdapter::NetHTTPAdapter.new do |http|
http.connection.ca_file = 'cacert.pem'
end
I'll be updating the rest of the gems to use this new way of using HTTP
adapters shortly.
I'm not actually going to draw any conclusions about the code you posted in
this issue because your environment is still the root of the problem. However
this code change should allow you to work-around the SSL issues you're having
and/or debug them more easily. Once the remainder of the updates I'm doing are
in place, I'll be happy to help you further diagnose the issue.
Original comment by bobaman@google.com
on 12 Mar 2011 at 12:59
The client has been updated to use the latest version of HTTP adapter, which
allows for the new functionality described above.
Original comment by bobaman@google.com
on 4 May 2011 at 12:32
Original issue reported on code.google.com by
William....@gmail.com
on 9 Mar 2011 at 4:44Attachments: