RFR: 8268558: [TESTBUG] Case 2 in TestP11KeyFactoryGetRSAKeySpec is skipped

Fernando Guallini fguallini at openjdk.java.net
Thu Sep 2 13:41:40 UTC 2021


This trivial change fixes the case 2 in test sun/security/pkcs11/rsa/TestP11KeyFactoryGetRSAKeySpec, the method testKeySpec is expecting a class object of type KeySpec as second argument in order to be reusable for multiple test scenarios, but then instead of using that argument the RSAPrivateKeySpec.class is hardcoded:


private static void testKeySpec(KeyFactory factory, PrivateKey key, Class<? extends KeySpec> specClass) throws Exception {
        try {
            KeySpec spec = factory.getKeySpec(key, RSAPrivateKeySpec.class);


it should be:

`KeySpec spec = factory.getKeySpec(key, specClass);
`

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

Commit messages:
 - use param specClass

Changes: https://git.openjdk.java.net/jdk/pull/5351/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5351&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8268558
  Stats: 3 lines in 1 file changed: 1 ins; 1 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5351.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5351/head:pull/5351

PR: https://git.openjdk.java.net/jdk/pull/5351



More information about the security-dev mailing list