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

can not use -Djava.ext.dirs to redirect SunJCE provider with security manager

    XMLWordPrintable

Details

    Description

      Test scenario
      ===============
      Try to redirect ext dir using -Djava.ext.dirs flag.
      let's say we try to redirect $JAVA_HOME/jre/lob/ext to $TESTHOME/ext
      in order to access SunJCE provider, we have to copy sunjce_provider
      from $JAVA_HOME/jre/lib/ext to $TESTHOME/newext
      Then we can use -Djava.ext.dirs=$TESTHOME/newext to redirect ext dir
      This supposed to work, but it don't.

      How to reproduce
      ===============
      1. cd /net/sqesvr/export/vsn/SECURITY/merlin_jdk/TestSuite/src/jce/Cipher/func/DESFunc
      2. set your JAVA_HOME
      3. sh Run.ext.sh
      4. you will see this
      java.security.NoSuchAlgorithmException: Algorithm DESede not available
              at javax.crypto.SunJCE_b.a(DashoA6275)
              at javax.crypto.Cipher.getInstance(DashoA6275)
              at TestCipherDESFunc.runTest(TestCipherDESFunc.java:86)
              at TestCipherDESFunc.run(TestCipherDESFunc.java:57)
              at TestCipherDESFunc.main(TestCipherDESFunc.java:35)

      Note:
      It failed with both Merlin JDK and Hopper JDK

      Attachments

        Activity

          People

            valeriep Valerie Peng
            skesunw Stuart Ke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: