ruby was-sdk v2 : Seahorse::Client::NetworkingError Exception: SSL_connect

戏子无情 提交于 2019-12-20 06:14:07

问题


I downloaded the ca-bundle.crt from https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt and installed it on my OS X Yosemite (10.10 w Ruby 2.2.1) local computer at /usr/local/etc/openssl/certs/ca-bundle.crt, as the was-sdk v2 is not anymore shipped with an SSL CA bundle

However, executing :

 @s3 = Aws::S3::Client.new(credentials: Aws.config[:credentials] )
 puts @s3.list_buckets()

I get an error

 *** Seahorse::Client::NetworkingError Exception: SSL_connect 
returned=1 errno=0 state=SSLv3 read server certificate 
B: certificate verify failed

I tried wo success to add the ca-bundle.cert path to my Aws.config

 Aws.config[:ssl_ca_bundle] = '/usr/local/etc/openssl/certs/ca-bundle.crt'

I also tried to disable the ssl peer verification (for test purpose only)

 Aws.config[:ssl_verify_peer] = false

But in both tests it's still failing ..

I read some issues posted about this topic, but none related to the final v2 version ... what could be the 'definitive' solution to this issue ? thanks for feedback


回答1:


It's an OS X / Homebrew issue ... install openssl w Homebrew the CA cert is located at : /usr/local/etc/openssl/cert.pem

so I need to configure it :

 Aws.config[:ssl_ca_bundle] = '/usr/local/etc/openssl/cert.pem'


来源:https://stackoverflow.com/questions/29318874/ruby-was-sdk-v2-seahorseclientnetworkingerror-exception-ssl-connect

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!