Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8268558

[TESTBUG] Case 2 in TestP11KeyFactoryGetRSAKeySpec is skipped

XMLWordPrintable

        There is a small issue in test/jdk/sun/security/pkcs11/rsa/TestP11KeyFactoryGetRSAKeySpec.java:
        the method testKeySpec is expecting a keySpec class as second argument in order to be reusable for multiple test scenarios, but instead of using that argument is hardcoding RSAPrivateKeySpec.class:

        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);

              fguallini Fernando Guallini
              fguallini Fernando Guallini
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: