Posted 17 days ago. Visible to the public.

Making httpclient use the operating system's SSL cert store

The httpclient gem comes with a custom SSL cert store.

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 = client.ssl_config.cert_store.set_default_paths client.get('https://....')

Once an application no longer requires constant development, it needs periodic maintenance for stable and secure operation. makandra offers monthly maintenance contracts that let you focus on your business while we make sure the lights stay on.

Author of this card:

Henning Koch
Last edit:
17 days ago
by Henning Koch
operating, system, linux, ruby
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Henning Koch to makandra dev