metanorma / ruby-packer

Packing your Ruby application into a single executable.
MIT License
6 stars 2 forks source link

Use included CA certificate in open-uri #38

Closed alexeymorozov closed 2 years ago

alexeymorozov commented 2 years ago

It occured the Net::HTTP.cert_store attribute is overriden in at least two places:

  1. https://github.com/ruby/ruby/blob/v2_6_3/lib/open-uri.rb#L327
  2. https://github.com/janko/down/blob/master/lib/down/net_http.rb#L265

We can use Net::HTTP.ca_file and extract the cert to a temporary directory.

Required for https://github.com/metanorma/packed-mn/pull/139