【发布时间】:2011-01-31 06:18:28
【问题描述】:
如何使用 net/http 在 ruby 中验证 https://processing.ukash.com/ 等网站的证书?
https = Net::HTTP.new('processing.ukash.com', 443)
https.use_ssl = true
https.verify_mode = OpenSSL::SSL::VERIFY_NONE
到目前为止有效,但我现在如何验证它是正确的证书?我从 firefox 中保存了证书,但生成的 .pem 文件中有很多证书,net/http 似乎不喜欢它。
【问题讨论】:
标签: ruby ssl https ssl-certificate verification