Akephalos: How to ignore SSL warnings?
I'm trying to set up Akephalos for use with Capybara. I ran into this
message when trying to visit
the page I am trying to test:
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated (NativeException)
(druby://127.0.0.1:35580) org/jruby/RubyKernel.java:2042:in `send'
(druby://127.0.0.1:35580) org/jruby/RubyKernel.java:1417:in `loop'
(druby://127.0.0.1:35580) org/jruby/RubyProc.java:268:in `call'
(druby://127.0.0.1:35580) org/jruby/RubyProc.java:232:in `call'
I wonder if it has anything to do with the fact that we are using a self-signed certificate. This is what my env.rb file looks like:
# Capybara configuration (using Akephalos)
require 'capybara'
require 'capybara/dsl'
require 'capybara/cucumber'
require 'akephalos'
Capybara.javascript_driver = :akephalos
Capybara.default_driver = :akephalos
Capybara.register_driver :akephalos do |app|
# available options:
# :ie6, :ie7, :ie8, :fir开发者_如何学Cefox_3, :firefox_3_6
Capybara::Driver::Akephalos.new(app, :browser => :firefox_3_6)
end
World(Capybara)
Yes, if the server is using a self-signed certificate, this can cause a warning/error such as 'peer not authenticated'.
The proper way around this problem is to specifically add the self-signed certificate to the trusted root store.
The wrong way around this problem is to turn off certificate verification.
I don't know the product you are using well enough to tell you how to do either of these things.
精彩评论