Sample
Demonstrate that Faraday's Net::HTTP adapter does not forward hostname verification unless requested.
sha256:a79deb9bff81a08d9165451d3a1aa27e3240ba68a577375e22c56938147a80d8
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Case
- Goal
- Demonstrate that Faraday's Net::HTTP adapter does not forward hostname verification unless requested. HOW
- Packages
- faraday-net_http 3.4.4 faraday 2.14.3
- Environment
- ruby
- Created
- 2026-08-17T01:15:21Z
Commonly assumed
Setting `ssl.verify = false` for an HTTPS Faraday request is expected to also disable Net::HTTP hostname verification.
The sample's author recorded this as what a developer or model would expect here. The contract below is what actually ran.
Contract
- A `verify: false` TLS option only changes `verify_mode`; Faraday only sets `verify_hostname` when `verify_hostname` is explicitly passed in SSL options.
- assert_equal(0, FakeHTTP.instances[0].verify_hostname_calls, 'verify_hostname is not set when only verify: false is configured')
- assert_equal(OpenSSL::SSL::VERIFY_NONE, FakeHTTP.instances[0].verify_mode)
- assert_equal(1, FakeHTTP.instances[1].verify_hostname_calls, 'verify_hostname is set when explicitly configured')
Files
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- test/contract.rb
Download the verified artifact (tar.gz) — the exact bytes the contract ran against
Origin Seeder
Verification receipts
- ruby 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17 · ed25519:d91480838ac982c9