Skip to content

Document explicit certificate stores for restricted CA trust - #61

Merged
iMacTia merged 2 commits into
lostisland:mainfrom
OskarEichler:codex/document-restricted-ca-trust
Oct 11, 2026
Merged

iMacTia merged 2 commits into
lostisland:mainfrom
OskarEichler:codex/document-restricted-ca-trust

Conversation

@OskarEichler

Copy link
Copy Markdown
Contributor

Summary

Document the existing additive CA behavior and show how to restrict trust using an explicit certificate store. Related to #14; this deliberately preserves the existing compatibility policy.

Reproduction and verification

Seven bounded localhost TLS exchanges use two generated synthetic CAs. Default trust and a matching CA succeed; ca_file/ca_path alone retain additive behavior. Adding an explicit empty store correctly rejects the unrelated CA, as does an explicit unrelated cert_store.

Only temporary public certificate files are written; private keys remain in memory. SSL_CERT_FILE/SSL_CERT_DIR changes are confined to the reproduction process and restored. All loopback servers and threads close. A candidate change to the default policy was evaluated locally but is excluded from this PR and the consumer branch after reviewing #14's compatibility discussion.

  • Each focused branch passes all 386 existing RSpec examples with Ruby 4.0.6 through rbenv.
  • The combined installed-3.4.4 branch also passes 386 examples, focused repros, full RuboCop (10 files), syntax, packaging and git diff --check.
  • Verification uses the locally verified Faraday 2.14.3 fixes. No version updates or production operations.

Limitations

No test/spec files added or modified: the originating repository forbids them. Focused reproductions ran outside the repository. Other Ruby versions and platforms have not been run locally. The PR contains only this focused change.

Breaking-change notes

None. Documentation only; certificate/hostname verification and default trust behavior are unchanged.

@iMacTia

iMacTia commented Oct 11, 2026

Copy link
Copy Markdown
Member

Verified against a loopback TLS server: ca_file is additive by default, an empty cert_store restricts trust, and ca_file still works with the empty store. The documentation is accurate.

Resolve README conflict by keeping both the SOCKS proxy and restricted
certificate authority sections.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@iMacTia
iMacTia merged commit 94304c8 into lostisland:main Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants