I'm connecting to a biztalk SOAP API, and I've been given a public cert from the server to use to connect using ssl server authentication.
I'm using: Ruby 1.9.2, Curb (0.7.15), Savon (0.9.1) HTTPi (0.9.2)
I can't seem to get it to work properly, but it works from the command line with CURL:
curl --cacert /path/to/cert https://raadeeraa
but I can't work out the combination of how to get it to work with Savon, HTTPi and Curb.
This goes through:
http.auth.ssl.ca_cert_file = '/path/to/cert'
http.auth.ssl.verify_mode = :peer
But this also goes through, so I don't think it's working properly:
http.auth.ssl.ca_cert_file = '/complete/load/of/nonsnse'
http.auth.ssl.verify_mode = :peer
This fails with a ssl cert error:
http.auth.ssl.ca_cert_file = '/path/to/cert'
http.auth.ssl.verify_mode = :none
`cert=': undefined method `rindex' for nil:NilClass (NoMethodError)
So I specify a cert as well:
http.auth.ssl.ca_cert_file = '/path/to/cert'
http.auth.ssl.cert_file = '/path/to/cert'
http.auth.ssl.verify_mode = :none
rails3.0.4/gems/httpi-0.9.2/lib/httpi/adapter/curb.rb:29:in `http_post': Problem with the local SSL certificate (Curl::Err::SSLCertificateError)
Please don't think I'm posting without reading, I've read all these pages and can't find a solution. Well, you'll have to take my word for it, I can only put up two hyperlinks :-)
http://rubydoc.info/gems/httpi/0.9.2/frames
https://github.com/rubiii/httpi
Any suggestions will be greatly appreciated.