-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JDK-8293412 Remove unnecessary java.security.egd overrides #10716
Conversation
👋 Welcome back mpowers! A progress list of the required criteria for merging this PR into |
No failures were noticed during mach5 and jtreg testing. |
Webrevs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is a good clean up so that the default one get used in testing.
@mcpowers This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. 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 58 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@XueleiFan, @djelinski) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
/label remove core-libs |
@AlanBateman |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still verifying the jarsigner and the SecurityTools changes, but all of the other files actually need the EGD override.
@@ -40,8 +40,6 @@ public class EnoughSeedTest { | |||
= Security.getProperty(DRBG_CONFIG); | |||
|
|||
public static void main(String[] args) { | |||
System.setProperty("java.security.egd", "file:/dev/urandom"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test uses generateSeed and needs egd to avoid reading from /dev/random
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Backing out change. I hadn't considered the fact that this test might be run on slower hardware.
@@ -27,7 +27,7 @@ | |||
* @bug 8156709 | |||
* @summary Cannot call setSeed on NativePRNG on Mac if EGD is /dev/urandom | |||
* @requires os.name == "Mac OS X" | |||
* @run main/othervm -Djava.security.egd=file:/dev/urandom MacNativePRNGSetSeed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change makes this test pointless, see summary 2 lines above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Backing out change.
@@ -41,7 +41,7 @@ | |||
* @library /lib/testlibrary | |||
* @summary Test behavior of a shared SecureRandom object when it is operated | |||
* by multiple threads concurrently. | |||
* @run main/othervm -Djava.security.egd=file:/dev/urandom MultiThreadTest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This uses generateSeed and needs egd to avoid using dev/random
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Backing out change.
@@ -53,8 +53,6 @@ public class ApiTest { | |||
= Security.getProperty(DRBG_CONFIG); | |||
|
|||
public static void main(String[] args) throws Exception { | |||
System.setProperty("java.security.egd", "file:/dev/urandom"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test uses generateSeed and needs egd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Backing out change.
@@ -29,7 +29,7 @@ | |||
* as well from its serialized instance in the same time then the | |||
* generated random numbers should be different when one or both are | |||
* reseeded. | |||
* @run main/othervm -Djava.security.egd=file:/dev/urandom SerializedSeedTest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This uses generateSeed and needs egd to avoid using dev/random
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Backing out change.
@@ -33,8 +33,6 @@ | |||
public class Serialize { | |||
|
|||
public static void main(String args[]) throws Exception { | |||
System.setProperty("java.security.egd", "file:/dev/urandom"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This uses generateSeed and needs egd to avoid using dev/random
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Backing out change.
@@ -26,7 +26,7 @@ | |||
* @bug 6998583 8141039 | |||
* @summary NativeSeedGenerator is making 8192 byte read requests from | |||
* entropy pool on each init. | |||
* @run main/othervm -Djava.security.egd=file:/dev/random SeedGeneratorChoice |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test uses generateSeed and should be run with egd pointing to /dev/urandom to avoid reading from /dev/random
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Backing out change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to /dev/urandom.
@@ -28,7 +28,7 @@ | |||
* @test | |||
* @bug 8051408 | |||
* @summary make sure nextBytes etc can be called before setSeed | |||
* @run main/othervm -Djava.security.egd=file:/dev/urandom AutoReseed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test uses generateSeed and needs egd to avoid reading from /dev/random
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Backing out change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! LGTM.
Verified with testing that /dev/urandom is used when overrides are removed from Compatibility.java and SecurityTools.java. |
/integrate |
/sponsor |
Going to push as commit 79d163d.
Your commit was automatically rebased without conflicts. |
https://bugs.openjdk.org/browse/JDK-8293412
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10716/head:pull/10716
$ git checkout pull/10716
Update a local copy of the PR:
$ git checkout pull/10716
$ git pull https://git.openjdk.org/jdk pull/10716/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 10716
View PR using the GUI difftool:
$ git pr show -t 10716
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10716.diff