Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-2378

KeySecure HSM Integration is not compatible with Java9

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.1.0
    • kms
    • None

    Description

      The patch introduced in RANGER-2331 relies on internal sun.security.pkcs11.SunPKCS11 class, unfortunately this class changed between Java 8 and 9, so the code no longer compiles on Java9+.

      The Java8 way of doing (documented here ) is:

      Provider p = new sun.security.pkcs11.SunPKCS11(configName);
      Security.addProvider(p);
      

      However, in Java 9, sun.security.pkcs11.SunPKCS11 doesn't have a constructor with a String parameter, and the documentation suggests suggest to use:

      Provider p = Security.getProvider("SunPKCS11");
      p = p.configure(configName);
      Security.addProvider(p); 
      

       

      Attachments

        1. RANGER-2378_01.patch
          8 kB
          Dhaval Shah
        2. RANGER-2378.patch
          5 kB
          Dhaval Shah

        Issue Links

          Activity

            People

              dhavalshah9131 Dhaval Shah
              zsombor Zsombor Gegesy
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: