Comments (7)
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.
Hi, try
request.auth.ssl.ca_cert_file = "certfile"
instead of
request.auth.ssl.cert_file = "certfile"
from httpi.
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.
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.
@ft51's change works to fix the problem for me. +1
from httpi.
released v0.9.6 which should fix this issue.
from httpi.
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)
- Diese Präsenz ist derzeit nicht verfügbar. HOT 1
- TLSv1_3 parameter support for ssl_version HOT 1
- Enforce IPv6 use? HOT 1
- Allow common `block` for all requests HOT 4
- Licence issue with Socksify gem HOT 4
- How can we define the environment for mounted rails apps HOT 2
- Savon breaks with http gem >= 5.0.0 HOT 2
- chore: Fix rspec deprecation warnings
- CI stopped on Travis HOT 1
- Can we remove socksify as a dependency? HOT 3
- Optional dependency rack used internally HOT 3
- HTTPi fails with https endpoint HOT 2
- rack 3.0 support HOT 1
- The future of httpi HOT 4
- Rack::Utils::HeaderHash --> Rack::Headers HOT 2
- Warning on Ruby 3.3 HOT 5
- ntlm tests fail with opensslv3
- uninitialized constant `Rack::Headers` with rack 2.x HOT 3
- Warning: Rack::Utils::HeaderHash is deprecated and will be removed in Rack 3.1, switch to Rack::Headers HOT 1
- Downcasing of header keys breaks bad servers HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from httpi.