8325766: Extend CertificateBuilder to create trust and end entity certificates programmatically#120
8325766: Extend CertificateBuilder to create trust and end entity certificates programmatically#120gnu-andrew wants to merge 6 commits into
Conversation
|
👋 Welcome back andrew! A progress list of the required criteria for merging this PR into |
|
@gnu-andrew This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been no new commits pushed to the ➡️ To integrate this PR with the above commit message to the |
|
This backport pull request has now been updated with issue from the original commit. |
Webrevs
|
|
@gnu-andrew Please merge master and this should make the windows build failures go away. Thanks! |
Yeah, will do. I should have waited a few hours for that to be merged to begin with. |
|
GHA failures in the serviceability area on macosx-x64 are intermittent: |
jerboaa
left a comment
There was a problem hiding this comment.
Confirmed it being the same as openjdk/jdk11u-dev#3222 plus the extra test change.
|
|
|
/approval request Test only backport to bring in the infrastructure to generate security certificates automatically rather than having static ones which eventually expire. Requesting this during rampdown so that it and 8384815 can be integrated to fix the failing PreferredKey tests in the upcoming release. The patch was pretty clean codewise but required some alterations to fit within the current test infrastructure of 8u. The patch was reviewed by Severin Gehwolf. |
|
@gnu-andrew |
|
/approve yes |
|
@jerboaa |
|
/integrate |
|
Going to push as commit e85e42b. |
|
@gnu-andrew Pushed as commit e85e42b. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
This is the same as openjdk/jdk11u-dev#3222 except I combined the test updates in the last two commits.
This change backports enhancements to the
CertificateBuildertest library to allow automated generation of certificates. It also replaces the static certificate inIPIdentities.javaand is a pre-requisite for backporting JDK-8384815The change actually backports fairly cleanly. There are just a few context differences because of the absence of JDK-8350807, which makes
IPIdentities.javaexplicitly use TLSv1.2, and JDK-8349501 which movesCertificateBuilderinto the regularjdk.test.libnamespace.A number of follow-ups, included as follow-on commits, are then needed to make
IPIdentities.javapass, and then to make otherCertificateBuilder-using classes pass again.IPIdentities.javaneeds to have@libraryand@buildlines added to useCertificateBuilder. This is based on its usage in existing test classes in 11u that already use it.SecureRandom.nextLong(long)so I ported this fromjava.util.random.RandomGeneratorandjdk.internal.util.random.RandomSupportin 17u tojdk.test.lib.Utils. It is currently used byIPIdentities.javaandCertificateBuilder.javaand placing it in the library leaves the option open for other tests to use it.CertificateBuilderto actually consistently work to the Builder pattern, returning itself from its methods. This is necessary both for the usage introduced in this patch inIPIdentities.javaand for the changes in 8384815, so builder invocations can be changed. I only included the return type changes from 8179502 and not the change to one of the methods.CertificateBuildernow needsUtilsfromjdk.test.lib.Utils, a few tests that already usedCertificateBuilderneed to reference/test/lib.I did start looking at backporting 8349501 but it is quite involved and has its own pre-requisites to explore. I wanted to make sure this and the follow-on could make the upcoming release and fix the currently broken test, so I worked around its absence for now. I do intend to backport it for the October release and this should clean up the dual library usage this change introduces by putting everything in
jdk.test.lib.Results for the tests which use
CertificateBuilderlook good with all passing after this patch.Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk11u.git pull/120/head:pull/120$ git checkout pull/120Update a local copy of the PR:
$ git checkout pull/120$ git pull https://git.openjdk.org/jdk11u.git pull/120/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 120View PR using the GUI difftool:
$ git pr show -t 120Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk11u/pull/120.diff
Using Webrev
Link to Webrev Comment