[9] RFR: 8048356: SecureRandom default provider tests

Bradford Wetmore bradford.wetmore at oracle.com
Mon Nov 9 21:54:15 UTC 2015



On 9/4/2015 1:43 PM, Rajan Halade wrote:
> Please help with your review of this new test to check default provider
> used with SecureRandom.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8048356
> Webrev: http://cr.openjdk.java.net/~rhalade/8048356/webrev.00/

51:  Minor nit, you might reverse the order to match line 47.

     ... if (!provider.equals("SUN"))...

I would suggest also doing a test with the specified provider.

     SecureRandom instance =
         SecureRandom.getInstance(algorithm, provider);

70:  For readability, you might also reset provider here, or at least 
provide a comment.

Otherwise, looks ok.

Brad



More information about the security-dev mailing list