From: Richard Conroy Date: 2010-07-25T19:18:44+09:00 Subject: Re: SSL communication with Mechanize --00032555b6467d9711048c33939f Content-Type: text/plain; charset=ISO-8859-1 On Sun, Jul 25, 2010 at 10:40 AM, poseid wrote: > In a network with SSL protection, I can work with http by using: > > http.verify_mode = OpenSSL::SSL::VERIFY_NONE > > However, trying to use Mechanize: > > How would I approach my agent class to find the attributes on SSL. > > It might help if you were more clear in stating what it is that you want to achieve, or what your specific problem is. Some of the most comprehensive discussion on SSL in Ruby was discussed on Ola Bini's blog: http://olabini.com (and his older http://olabini.blogspot.com - useful articles on both). There are many code examples, as well as a great writeup (for any language) on the fundamentals of security/cryptography. For instance VERIFY_NONE is almost never what you want to do in a secure environment - its basically the same thing as 'trust all certificates'. If you want to use VERIFY_PEER you need to have a local keystore, where you import cacerts (certificates from certificate authorities) that you can verify your sites certificates against. Also note, that there are alternative HTTP clients, some like Http-client, Httparty, Resourceful etc. Which might handle SSL better, or in a more transparent way. -- http://richardconroy.blogspot.com --00032555b6467d9711048c33939f--