9
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Windowsでcucumber実行時にSSLエラーが出た場合の対処法

Last updated at Posted at 2014-01-10
  • Windows環境でcucumberを実行したところ以下のようなエラーが出た
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)
C:/Ruby193/lib/ruby/1.9.1/net/http.rb:800:in `connect'
C:/Ruby193/lib/ruby/1.9.1/net/http.rb:800:in `block in connect'
C:/Ruby193/lib/ruby/1.9.1/timeout.rb:55:in `timeout'
C:/Ruby193/lib/ruby/1.9.1/timeout.rb:100:in `timeout'
C:/Ruby193/lib/ruby/1.9.1/net/http.rb:800:in `connect'
C:/Ruby193/lib/ruby/1.9.1/net/http.rb:756:in `do_start'
C:/Ruby193/lib/ruby/1.9.1/net/http.rb:745:in `start'
C:/Ruby193/lib/ruby/1.9.1/open-uri.rb:306:in `open_http'
C:/Ruby193/lib/ruby/1.9.1/open-uri.rb:775:in `buffer_open'
C:/Ruby193/lib/ruby/1.9.1/open-uri.rb:203:in `block in open_loop'
C:/Ruby193/lib/ruby/1.9.1/open-uri.rb:201:in `catch'
C:/Ruby193/lib/ruby/1.9.1/open-uri.rb:201:in `open_loop'
C:/Ruby193/lib/ruby/1.9.1/open-uri.rb:146:in `open_uri'
C:/Ruby193/lib/ruby/1.9.1/open-uri.rb:677:in `open'
C:/Ruby193/lib/ruby/1.9.1/open-uri.rb:33:in `open'

対処方法

  • SSL証明書を配置し、環境変数SSL_CERT_FILEにそのパスを入れる
  • SSL証明書は http://curl.haxx.se/ca/cacert.pem からDLする
  • cURLのサイト上で配布してるMozillaで利用している証明書らしい

ソース

9
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?