Repository navigation
jetbrains-jdk: generate cacerts from cacert - #577767
Merged
Merged
Conversation
Assisted-by: Claude Code (Claude Fable 5.1) Assisted-by: Claude Code (Claude Opus 5.5)
28 of 37 tasks
aoli-al
approved these changes
Oct 24, 2026
Contributor
|
Successfully created backport PR for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #576543.
nixpkgs builds the JetBrains Runtime,
jetbrains.jdkandjetbrains.jdk-no-jcef, from source withdontConfigure = trueinpkgs/development/compilers/jetbrains-jdk/common.nix. Thus, thepreConfigurestep ofopenjdk, which makeslib/security/cacertsfromcacert(#576518), is not done. Before this change, the Java trust store,lib/openjdk/lib/security/cacerts, has the list of JetBrains: 109 roots, andAAA Certificate ServicesandemSign ECC Root CA - G3are two of them. This change makes a newcacertsfrom thecacertbundle withjre-generate-cacertsinbuildPhase. Then it adds--with-cacerts-filefor this file to the options that themkimages_*.shscript of JetBrains gives toconfigure. The log ofconfigureshowschecking for cacerts file... /build/cacerts-gen/cacerts. After this change, the trust store has 118 roots, the same roots ascacert. The two packages build in the Nix sandbox:jetbrains.jdk-no-jcefin 14 minutes, andjetbrains.jdkin 15 minutes.jetbrains.jdk-21andjetbrains.jdk-no-jcef-21use the samecommon.nixand get the same change, but the harness did not examine them.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. The harness builds the JDK from source with
--force-build. This build is approximately 15 minutes long, and approximately 8 GB of space in the build directory is necessary.Harness output: jetbrains.jdk
The harness tests the package with the 14 certificate chains of the eMudhra incident, from https://emudhra.we-have-a-problem.com/ (only the certificates, not the keys). Before this change, the trust store of the JDK accepts all 14 chains (
accepted 14/14). Thus, it accepts the eMudhra intermediate certificates throughemSign ECC Root CA - G3and through the Sectigo cross-sign byAAA Certificate Services. After this change, the trust store accepts no chain (accepted 0/14). In the second part of the output, a small Java test on thejavaof the JDK sends one request to each of four test servers. Before this change, the test connects to all four servers. After this change, the test connects to no server.The first part of the harness output shows
NOT FIXED. The only cause islib/openjdk/lib/libcef.so, the Chromium of JCEF, which has roots in its compiled code. This change does not change this file. This is the same type of problem as #576544. The harness cannot read these compiled roots, thus the chain test showsn/afor this file.jetbrains.jdk-no-jcefhas nolibcef.so, and for this package the harness showsFIXED.Things done
./result/bin/.nixpkgs-reviewon this PR. See nixpkgs-review usage.passthru.tests.