GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Document explicit certificate stores for restricted CA trust (#61) · lostisland/faraday-net_http@94304c8

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • README.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎README.md‎

Copy file name to clipboardExpand all lines: README.md
+19Lines changed: 19 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,25 @@ conn = Faraday.new(...) do |f|
3131
end
3232
```
3333

34+
### Restricting trusted certificate authorities
35+
36+
By default, `ca_file` and `ca_path` add certificate authorities to the system
37+
trust store. They do not restrict trust to only the supplied authorities.
38+
To restrict trust, provide an explicit certificate store. An empty store lets
39+
you trust only the authorities supplied through `ca_file` or `ca_path`:
40+
41+
```ruby
42+
require 'openssl'
43+
44+
conn = Faraday.new('https://example.com', ssl: {
45+
ca_file: '/path/to/trusted-ca.pem',
46+
cert_store: OpenSSL::X509::Store.new
47+
})
48+
```
49+
50+
Certificate and hostname verification remain enabled. Alternatively, populate
51+
the explicit store yourself with `add_file` or `add_cert` and omit `ca_file`.
52+
3453
### SOCKS proxy
3554

3655
A `socks://` proxy is supported when the optional [socksify][socksify] gem (`~> 1.8`) is installed. It is not a dependency of this gem, so add it to your Gemfile:

0 commit comments

Comments
0 (0)
You are visitor 01402605 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.