CodeSampleX

Sample

faraday-net_http 3.4.4: Demonstrate that Faraday's Net::HTTP adapter does not forward hostname verification unless requested.

Verified sample for gem faraday-net_http 3.4.4: Demonstrate that Faraday's Net::HTTP adapter does not forward hostname verification unless requested. The…

sha256:a79deb9bff81a08d9165451d3a1aa27e3240ba68a577375e22c56938147a80d8

This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured. How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people. MIT-0

Execution evidence

The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.

Evidence basis
Signed contract pass
Verification receipts
2
Signing keys that built it
2
Declared environment ruby linux x64 ruby ruby bundle

Verification-run environments

Environment Contract Stages Run
ruby 3 · linux debian/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · rubygems@1
2026-08-17
ruby 3 · linux debian/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · rubygems@1
2026-08-18

Case

HOW
Goal
Demonstrate that Faraday's Net::HTTP adapter does not forward hostname verification unless requested.
Packages
Symbols
  • Faraday::Adapter::NetHttp#configure_ssl
  • Faraday::Adapter::NetHttp#build_connection
  • OpenSSL::SSL::VERIFY_NONE
Environment
ruby
Created
2026-08-17T01:15:21Z

Contract

  1. A `verify: false` TLS option only changes `verify_mode`; Faraday only sets `verify_hostname` when `verify_hostname` is explicitly passed in SSL options.
  2. assert_equal(0, FakeHTTP.instances[0].verify_hostname_calls, 'verify_hostname is not set when only verify: false is configured')
  3. assert_equal(OpenSSL::SSL::VERIFY_NONE, FakeHTTP.instances[0].verify_mode)
  4. 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 source artifact (tar.gz)

Origin Seeder

csx-seed