Integrated: 8293326: jdk/sun/security/tools/jarsigner/compatibility/SignTwice.java slow on Windows

Daniel Jeliński djelinski at openjdk.org
Wed Sep 7 05:29:07 UTC 2022


On Mon, 5 Sep 2022 09:29:49 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:

> This patch enables SignTwice test to complete faster on Windows machines.
> 
> The test starts `keytool` and `jarsigner` a number of times, passing `-J-Djava.security.egd=file:/dev/./urandom` to the started process, presumably to avoid blocking on VMs with insufficient entropy. This works fine on machines where `/dev/./urandom` is actually present. On Windows it makes the JVM use `ThreadedSeedGenerator`, which is very slow compared to the other options.
> 
> The fix removes `java.security.egd` setting on Windows machines.
> 
> Alternatively we could change the egd to use `file:/dev/urandom` (without the `/./` part); this also fixes the Windows problem. Is the `/./` part still needed? If I understand correctly, it was a workaround for some JDK7 bug.

This pull request has now been integrated.

Changeset: 205f992e
Author:    Daniel Jeliński <djelinski at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/205f992e9ecf9f83bb052ee2e2a32e3f532c5ac9
Stats:     13 lines in 1 file changed: 10 ins; 3 del; 0 mod

8293326: jdk/sun/security/tools/jarsigner/compatibility/SignTwice.java slow on Windows

Reviewed-by: weijun, wetmore

-------------

PR: https://git.openjdk.org/jdk/pull/10160



More information about the security-dev mailing list