Giter Club home page Giter Club logo

Comments (7)

mjdavies avatar mjdavies commented on July 2, 2024

Hi Rolle

I'm having a bit of a time getting this working too

http://www.ruby-forum.com/topic/1490195#992494

If I get any answers, I'll let you know

Can you post up your entire code?

from httpi.

Rolle avatar Rolle commented on July 2, 2024

Hi, try

request.auth.ssl.ca_cert_file = "certfile"

instead of

request.auth.ssl.cert_file = "certfile"

from httpi.

mjdavies avatar mjdavies commented on July 2, 2024

In order to get ssl auth working with :peer set and only using a ca_cert_file was to use Rolle's fix, and also remove the ? at the end of line 70

setup_ssl_auth request.auth.ssl if request.auth.ssl?

becomes

setup_ssl_auth request.auth.ssl if request.auth.ssl

from httpi.

ft51 avatar ft51 commented on July 2, 2024

When using ruby 1.9.2, net/https and a ca_cert_file the following prevented the 'certificate verify failed' error:

class HTTPI::Auth::SSL
  def present?
    (verify_mode == :none) || (cert && cert_key) || ca_cert_file
  # added this                                   ^^^^^^^^^^^^^^^
  rescue TypeError, Errno::ENOENT
    false
  end
end

from httpi.

mvastola avatar mvastola commented on July 2, 2024

@ft51's change works to fix the problem for me. +1

from httpi.

rubiii avatar rubiii commented on July 2, 2024

released v0.9.6 which should fix this issue.

from httpi.

robertgrimm avatar robertgrimm commented on July 2, 2024

Even with v0.9.6, I had to use the two fixes mentioned by mjdavies and Rolle in order to get this to work.

That is, use: client.ssl_config.set_trust_ca(ssl.ca_cert_file) if ssl.ca_cert_file and setup_ssl_auth request.auth.ssl if request.auth.ssl

from httpi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.