Skip to content

Fix inverted verifyCert check which disabled TLS certificate verification by default - #63

Open
fingolfin wants to merge 2 commits into
masterfrom
fix-verifycert
Open

Fix inverted verifyCert check which disabled TLS certificate verification by default#63
fingolfin wants to merge 2 commits into
masterfrom
fix-verifycert

Conversation

@fingolfin

Copy link
Copy Markdown
Member

The block disabling CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST ran
when verifyCert was true. So the default settings turned TLS verification
off, and verifyCert := false left it on.

Adds a test that serves HTTPS from openssl s_server with a freshly generated
self-signed certificate and checks that the download fails by default and
succeeds only with verifyCert := false. It is skipped where openssl is
missing. With the old condition restored it reports [ true, false ] instead
of [ false, true ].

Fixes #61

Co-Authored-By: Claude Opus 5 noreply@anthropic.com

fingolfin and others added 2 commits August 14, 2026 21:08
The block disabling CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST ran
when verifyCert was true, so the default settings turned TLS verification
off, while verifyCert := false left it on.

Fixes #61

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Runs `openssl s_server` with a freshly generated self-signed certificate,
and checks that the download fails by default and succeeds only with
verifyCert := false. Skipped if openssl is not available.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.0%. Comparing base (6db0e56) to head (f6755d4).

Additional details and impacted files
@@           Coverage Diff            @@
##           master     #63     +/-   ##
========================================
+ Coverage    95.3%   96.0%   +0.6%     
========================================
  Files           3       3             
  Lines         152     152             
  Branches       15      15             
========================================
+ Hits          145     146      +1     
  Misses          3       3             
+ Partials        4       3      -1     
Files with missing lines Coverage Δ
src/curl.c 94.1% <100.0%> (+0.9%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

inverted verifyCert condition in src/curl.c

1 participant