unwire / handsoap

Handsoap is a library for creating SOAP clients in Ruby
http://github.com/unwire/handsoap
225 stars 58 forks source link

SSL Authentication #12

Closed seejohnrun closed 10 years ago

seejohnrun commented 14 years ago

I need to use a X509 certificate with handsoap. Opening this issue as per http://rdoc.info/projects/unwire/handsoap

tjgfernandes commented 14 years ago

Hi.

did you try to use in invoke(...) parameter hash: :http_options=>{::trust_ca_file=>"ca cert", :client_cert_file=>"client cert", :client_cert_key_file=>"cert key file"}

??

phil-ho commented 14 years ago

I would also like to use X509 certificate with handsoap. tjgfernandes, i'm not sure what you mean. I don't see that in the documentation.

[update] I see there are actually 2 parts to what you suggested. 1) I need to switch the Handsoap.http_driver = :httpclient, 2) then...when I call invoke(action, options = { :soap_action => :auto, :http_options => nil }, &block)... I need to set the :http_options to what u said above...

None of this is documented, maybe because handsoap doesn't officially support SSL by x509? Here's hoping it does...

tjgfernandes commented 14 years ago

hi, sorry for the very late reply :/

the support for x509 exists, but wasn't very good. yes, you have to use httpclient. the configuration for 2 was sugested by me and the pushed to handsoap and i add nothing to the documentation :/ my bad.

i'm currently using handsoap with x509 certificates to auth with IIS server. it works :)