Read more

Making httpclient use the operating system's SSL cert store

Henning Koch
March 01, 2018Software engineer at makandra GmbH

The httpclient Show archive.org snapshot gem comes with a custom SSL cert store.

Illustration web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
Read more Show archive.org snapshot

While an customizable, application-level cert store is great when you need to deal with broken or self-signed certificates, you usually want to use the cert store from the underlying Linux. The Linux cert store is updated periodically while httpclient's cert store goes out of date and will eventually not be able to verify certs.

To use the cert store from the underlying operating system:

client = HTTPClient.new
client.ssl_config.cert_store.set_default_paths
client.get('https://....')
Posted by Henning Koch to makandra dev (2018-03-01 14:17)