hello,
I have a problem, I want to do is get a certificate .p12, I am
implementing the following code:
m= Mechanize.new
m.log = Logger.new "m.log"
m.user_agent_alias = "Mac Safari"
if RbConfig::CONFIG["host_os"] =~ /mingw|mswin/
ca_path = File.expand_path "C:/Users/amdx3/Desktop/cacert.p12"
m.agent.http.ca_file = ca_path
end
pag = m.get "https://www.newpage.com.mx/login" # the site is
only
informative
form = pagina.forms.first
campos = form.fields.find_all
titulo = pagina.title
form.field_with(:name => "username").value =
"******" only informative
form.field_with(:name => "password").value =
"******" only informative
search_results = m.submit form
@page = search_results.body
and display this:
Action Controller: Exception caught
OpenSSL::SSL::SSLError in AutoController#login
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B:
certificate verify failed
I?m new at this, help!
--
---------------------------------------------------
*Juan Jos? L?pez Gonz?lez*
Jesco Solutions S.A. de C.V.
Tel. / fax (33) 3122-1313
---------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/mechanize-users/attachments/20121219/46501692/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: juanjose.vcf
Type: text/x-vcard
Size: 268 bytes
Desc: not available
URL:
<http://rubyforge.org/pipermail/mechanize-users/attachments/20121219/46501692/attachment.vcf>