6

I have a webscraper in ruby that analyses certificates by using this:

http = Net::HTTP.new(http_endpoint.host, http_endpoint.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
http.start do |h|
    @cert = h.peer_cert
end

Is it possible to mock this request using webmock and give a fake certificate during testing?

4

1 回答 1

-1

我看到这是一个老问题,但这可能会有所帮助

于 2020-12-02T15:03:34.940 回答