RFR: 8329754: The ThreadSafe attribute is ignored for SecureRandom algorithm aliases [v3]

Artur Barashev duke at openjdk.org
Mon Sep 9 18:04:05 UTC 2024


On Mon, 9 Sep 2024 15:54:36 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> Good idea, added more tests. Alternatively we could re-work the `GetInstance` utility class to store the real algo name, but then we should update all the callers of that class to use the real algorithm and not the (possible) alias name. Not sure how safe it would be, some callers probably use the alias name for logging and debugging.
>
> Great. Some simple comments:
> 1. `List.of(alias)` is shorter.
> 2. There is a `jdk.test.lib.Utils` method that will simplify the exception check:
> 
>         Utils.runAndCheckException(
>                 () -> NoSync.test(SecureRandom.getInstance("S2", p), 5, 5),
>                 RuntimeException.class);
> 
> Otherwise, all good.

All done.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20916#discussion_r1750697415


More information about the security-dev mailing list