-
Notifications
You must be signed in to change notification settings - Fork 637
Description
Describe the bug
Stripe recently sent an email announcing that the api.stripe.com certificates will no longer be issued from "DigiCert High Assurance EV Root CA" starting February 16. We checked if this could cause problems for us, and initially we figured the line
if your system doesn’t perform certificate pinning, no action is required
applied to us. Then we realized the gem bundles a copy of Mozilla's root certificates file here and configures it here. In essence the gem not following Stripes own advice 😅 from the same page:
Stripe recommends against certificate pinning to avoid complications with your integration when we roll out new certificates for our systems. DigiCert, one of the major CAs, also recommends against certificate pinning.
As a Stripe user, if you must use certificate pinning for some reason, make sure you pin only (and all of) the root certificates listed below.
Shipping outdated root certificates can lead to outages, for example Shopify experienced this in 2022 with the httpclient gem. Specifically for us: we're on Stripe gem 12.x and are working on upgrading, but it looks like this could impact clients as recent as 18.0.1. The last recent update to the ca-certificates.crt file shipped in 18.1 on December 16, 2025. Comparing the 18.0.1 certificate bundle with the aforementioned list, the following roots are missing:
- DigiCert TLS ECC P384 Root G5
- DigiCert TLS RSA4096 Root G5
(Originally had more listed here, I noticed the naming didn't match exactly, and looked up by base64 encoding instead)
Expected behavior
Stripe gem doesn't configure it's own ca_bundle_path, relying on OpenSSL gem defaults instead.
Workaround
Manually configuring the Stripe gem to use the default certificate bundle. E.g. in a Rails initalizer:
Stripe.ca_bundle_path = OpenSSL::X509::DEFAULT_CERT_FILEAdditional context
A bit of code archeology tells me its a workaround from the original gem release in 2011: SSL wasn't ubiquitous, local installations often shipped with broken OpenSSL installations and setting VERIFY_NONE was a common workaround at the time. This doesn't apply anymore today, we use plenty of Ruby net/http based API clients that use the default system CA store just fine.
IMO it's not Stripe's job to try and fix people's broken OpenSSL installations, especially when that will now cause more breakage for older gem users.