Fix SSL CA certificate detection for extension downloads#640
Merged
Conversation
Contributor
Author
|
gh runner ran out of space https://github.com/LadybugDB/ladybug/actions/runs/28604605424/job/84821529263?pr=640#step:13:1808 |
adsharma
pushed a commit
to LadybugDB/bugscope
that referenced
this pull request
Jul 14, 2026
0.18.1 fixes SSL CA certificate detection for extension downloads (LadybugDB/ladybug#640). Caveat: SSL on macOS is not fully settled in this release; the published 0.18.1 macOS Node addon still hardcodes build-machine OpenSSL paths, addressed post-release by LadybugDB/ladybug#682. That addon is a different artifact from the liblbug C library linked here, so it does not gate this bump. Point CI's liblbug artifact resolution at the matching ref; CI needs a successful build-and-deploy run for v0.18.1 to exist. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extension downloads over HTTPS fail with SSL verification errors when a Ladybug wheel built on one Linux distro (e.g. RHEL) is run on another (e.g. Debian). The vendored httplib (v0.14.2) falls back to OpenSSL's compile-time default CA paths, which don't match the runtime system's CA bundle location.
This PR adds
ExtensionUtils::getCaCertPath()which probes for a usable CA bundle in order:SSL_CERT_FILE/SSL_CERT_DIRenv vars, then well-known distro paths (Debian, RHEL, openSUSE, Alpine, macOS Homebrew), then CApath directories. The result is wired into the extension download client viaset_ca_cert_path(). If nothing is found, it returnsstd::nulloptand OpenSSL's defaults apply (preserving existing behavior).Limitation
macOS Keychain loading is not supported by the vendored httplib v0.14.2 (that support was added in later upstream versions). On a clean macOS install without a Homebrew-provided CA bundle at
/etc/ssl/cert.pem, the probe will find nothing and fall back to OpenSSL defaults, which may still fail. Probably the real fix for macOS is upgrading the vendored httplib.