JceKeyStore test failed due to the order of registered provider

XMLWordPrintable

    • fontanel
    • sparc
    • solaris_7

      JceKeyStore test failed due to the order of registered provider
      It will pass under the following order
      security.provider.1=sun.security.provider.Sun
      security.provider.2=com.sun.rsajca.Provider
      security.provider.3=com.sun.crypto.provider.SunJCE
      security.provider.4=COM.rsa.jsafe.provider.JsafeJCE

      It will fail under the following order
      security.provider.1=sun.security.provider.Sun
      security.provider.2=com.sun.rsajca.Provider
      security.provider.3=COM.rsa.jsafe.provider.JsafeJCE
      security.provider.4=com.sun.crypto.provider.SunJCE

      It will throw the following exception

      java.lang.NullPointerException
      at javax.crypto.spec.PBEParameterSpec.<init>(PBEParameterSpec.java:43)
      at COM.rsa.jsafe.provider.JSA_PBEParameters.engineGetParameterSpec(JSA_PBEParameters.java:198)
      at java.security.AlgorithmParameters.getParameterSpec(Unknown Source)
      at com.sun.crypto.provider.PBEWithMD5AndTripleDESCipher.engineInit(PBEWithMD5AndTripleDESCipher.java:366)
      at javax.crypto.Cipher.init(Cipher.java:1014)
      at javax.crypto.SealedObject.unseal(SealedObject.java:364)
      at javax.crypto.SealedObject.getObject(SealedObject.java:212)
      at com.sun.crypto.provider.KeyProtector.unseal(KeyProtector.java:334)
      at com.sun.crypto.provider.JceKeyStore.engineGetKey(JceKeyStore.java:123)
      at java.security.KeyStore.getKey(Unknown Source)
      at TestKeyStoreEntry.run(TestKeyStoreEntry.java:104)
      at TestKeyStoreEntry.main(TestKeyStoreEntry.java:135)
      STATUS:Failed.

      In order to reproduce this bug, you should
      1. modify the java.security file as mentioned above.
      2. copy SunJCE jar file and JsafeJCE jar file to your JDK_HOME/jre/lib/ext
      3. you can find the testing program and JsafeJCE jar file from this attachment.

            Assignee:
            Sharon Liu (Inactive)
            Reporter:
            Stuart Ke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: