I need mechanize to ignore the name verification failure of an SSL cert. In this case, I''m using mech to test several servers that are behind a load balancer, but I''m bypassing the LB. Rewriting my hosts file every time I check 1 of the servers is not optimal. :-/ Jon
Rockin, man. Worked flawlessly. Thanks! On Fri, Jul 24, 2009 at 8:12 PM, Mike Dalessio<mike at csa.net> wrote:> This should work: > > ??? agent = WWW::Mechanize.new > ??? agent.verify_callback = Proc.new do |ok,x509| > ????? status = x509.error > ????? msg = x509.error_string > ????? logger.warn "server certificate verify: status: #{status}, msg: > #{msg}" if status != 0 > ????? true # this has the side effect of ignoring errors. nice! > ??? end >