[
https://issues.apache.org/jira/browse/RANGER-2378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16963939#comment-16963939
]
Dhaval B. SHAH commented on RANGER-2378:
----------------------------------------
Apache commit Link:
[https://github.com/apache/ranger/commit/1a6b97e2c948347383ae2c279721e1c3ea7eaff5]
> KeySecure HSM Integration is not compatible with Java9
> ------------------------------------------------------
>
> Key: RANGER-2378
> URL: https://issues.apache.org/jira/browse/RANGER-2378
> Project: Ranger
> Issue Type: Bug
> Components: kms
> Reporter: Zsombor Gegesy
> Assignee: Dhaval B. SHAH
> Priority: Major
> Attachments: RANGER-2378.patch, RANGER-2378_01.patch
>
>
> 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|https://docs.oracle.com/javase/8/docs/technotes/guides/security/p11guide.html]
> ) is:
> {code}
> Provider p = new sun.security.pkcs11.SunPKCS11(configName);
> Security.addProvider(p);
> {code}
> However, in Java 9, sun.security.pkcs11.SunPKCS11 doesn't have a constructor
> with a String parameter, and the documentation
> [suggests|https://docs.oracle.com/javase/9/security/pkcs11-reference-guide1.htm]
> suggest to use:
> {code}
> Provider p = Security.getProvider("SunPKCS11");
> p = p.configure(configName);
> Security.addProvider(p);
> {code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)