Sreevarshini Kuppuraj wrote: > Frederick Cheung wrote: >> On Aug 25, 5:16�am, Sreevarshini Kuppuraj <li...@ruby-forum.com> >> wrote: >>> Frederick Cheung wrote: >> >>> Hi Fred, >>> thanks for the reply. i am already using open SSL library, can you help >>> me with any example or code snippet on how to read the pem file in ruby? >> >> You should be able to do something like >> OpenSSL::X509::Certificate.new(File.read(path_to_certificate)) >> (OpenSSL::PKey::RSA.new(File.read(path_to_key)) if it's just a key in >> the pem file) >> >> Fred > > Hi Fred, > I did the same with the follwing line of code, but i am getting > "certificate verify failed" error > > Code snippet: > cert = File.read("sdk-seller_cert_key.pem") > pem = File.read("sdk-seller.pem") > http.use_ssl = true > http.cert = OpenSSL::X509::Certificate.new(cert) > http.key = OpenSSL::PKey::RSA.new(pem) > http.verify_mode = OpenSSL::SSL::VERIFY_PEER > > Where am i going wrrong? > > Thanks
Hi, any work arround for this issue? Thanks -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.