Repository navigation
h2o: use cacert bundle instead of vendored CA bundle - #577128
Conversation
Assisted-by: Claude Code (Claude Fable 5.1) Assisted-by: Claude Code (Claude Opus 5.5)
|
@irgolic this looks okay, but should we make it optional like |
We can! But seemingly none of the other fixes in #576541 are doing so, is there a particular reason you'd like to do it for this one? |
|
I usually default to making things configurable by default. I am not sure “what” that use case is tho! I don’t have strong feelings other than the slight sense that someone might want to turn this knob. If you deem it a dumb idea, I would just approve it. (I am running this patch BTW). |
|
I'll prioritize maintainer taste! I've added the knob. |
| wrapProgram "$out/bin/h2olog" \ | ||
| --set "PERL5LIB" "$PERL5LIB" | ||
| '' | ||
| + lib.optionalString (!withVendoredCACert) '' |
There was a problem hiding this comment.
Why is this an option? This is a general distribution guidance thingy, like we also do not compile with vendored libraries. IMO it should be removed or we should mark the package as insecure it it is set to true which would be rather silly to do.
There was a problem hiding this comment.
can be backported if merged
Part of #576541.
h2o has a bundled CA file,
share/h2o/ca-bundle.crt. h2o uses this file as the default trust store when it is a proxy to HTTPS servers.h2o-httpclientalso uses it. h2o finds the file throughH2O_ROOT, which the build sets to theoutpath. This change replaces the file with a symlink to theca-bundle.crtfile ofcacertinpostInstall. The new argumentwithVendoredCACert(defaultfalse) keeps the bundled file when it istrue.Warning
AI Disclosure: Claude Code made the code change, the commit message and the first version of this pull request description. Claude Code used Claude Fable 5.1 and Claude Opus 5.5. I examined all of this work. Claude Code also wrote all of nix-cacert-harness. This pull request description is written in ASD-STE100 (Simplified Technical English), examined with memelint in
strictmode.Test
nix-cacert-harness examines the package before and after this change. A local copy of nixpkgs is not necessary.
Harness output: h2o
In the second part of the output, the harness adds a temporary test root to
cacertand builds the package again. Thenh2o-httpclientsends a request to a localopenssl s_server.h2o-httpclientexamines the certificate of the server by default. The certificate of this server chains to the test root. Before this change,cacerthas no effect on the result. After this change, it has an effect.Things done
./result/bin/.nixpkgs-reviewon this PR. See nixpkgs-review usage.passthru.tests.