[15] RFR JDK-8246613: Choose the default SecureRandom algo based on registration ordering

Sean Mullan sean.mullan at oracle.com
Thu Jun 4 21:01:31 UTC 2020


On 6/4/20 3:34 PM, Valerie Peng wrote:
> Hi,
> 
> Could someone help reviewing this fix? This change keep tracks of the 
> first registered SecureRandom algorithm and returns it upon the request 
> of SecureRandom class.

This looks good to me. I would recommend that Max or someone else 
review it as well.

> Bug: https://bugs.openjdk.java.net/browse/JDK-8246613
> 
> Webrev: http://cr.openjdk.java.net/~valeriep/8246613/webrev.00/

A couple of minor comments, feel free to fix or ignore.

* SecureRandom.java

879             // For SUN provider, we use 
SunEntries.DEFF_SECURE_RANDOM_ALGO

Might as well fix the typo while you are in there: s/DEFF/DEF/

* Provider.java

1156     private String parseSecureRandomPut(String name, String value) {

Could be static if you also make getTypeAndAlgorithm static, I think.

--Sean



More information about the security-dev mailing list