From: "NAKAMURA, Hiroshi" Date: 2005-02-01T16:37:53+09:00 Subject: Re: http_access2 and SSL --------------enig000A10C2CB00607313581082 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, Ed O'Loughlin wrote: > I'm somewhat new to Ruby. I'm trying to force myself to use Ruby rather > than perl to write a simple script to get a form from a url and post > data using http_access2. It seems simple enough except that the site > uses https and has a self-signed cert. > > My code is quite simple: > > client = HTTPAccess2::Client.new(proxy) > # etc... > content = client.get_content(login_url) > > I get the error in OpenSSL (see below). I had a look at the http_access2 > code and it seems to provide for configuring OpenSSL (I want to tell it > not to verify certs) but it's not exposed in the constructor. I'm not > familiar enough with Ruby to decode some of the syntax, so I'm not sure > if there is a way of passing options to ssl. You can tell a client not to verify the server with; client.ssl_config.verify_mode = nil Bear in mind that it's just an insecure and awkwardly slow connection. :-) I recommend to set trusted CA certificate with; client.cfg.set_trust_ca('ca_cert.pem') FYI: here is a project site of http-access2: http://rrr.jin.gr.jp/projects/http-access2 Regards, // NaHi --------------enig000A10C2CB00607313581082 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Cygwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFB/zHEf6b33ts2dPkRAiGbAJ0RfqY/+CPIgi3GnJCYeWDZ12wQlQCeIY9o D/uNoV7S1h/KhIqacjipy7o= =KiFj -----END PGP SIGNATURE----- --------------enig000A10C2CB00607313581082--