I'm trying to consume a soap web service using Ruby on Rails and gem Savon .
I'm doing as follows:
Savon.client(
wsdl: 'web_service_url',
ssl_verify_mode: :peer,
ssl_cert_file: 'cert_path',
ssl_cert_key_file: 'key_path'
).operations
And then got the Error: HTTPI::SSLError: SSL_connect returned=1 errno=0 state=unknown state: certificate verify failed
But if i make a request with CURL using the same certificate and key , works perfectly.
curl -k --cert 'cert_path' --key 'key_path 'web_service_url'
What is the problem, how to fix it?
what is the output of
print OpenSSL::OPENSSL_VERSION
What about ignoring the certificate and specify
:ssl_verify_mode: :none
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.