简体   繁体   English

Ruby on Rails-Savon证书申请

[英]Ruby on Rails - Savon certificate request

I'm trying to consume a soap web service using Ruby on Rails and gem Savon . 我正在尝试使用Ruby on Rails和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 然后收到错误: 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发出请求,则效果很好。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM