Java 10上的SunPKCS11

时间:2018-09-12 12:23:47

标签: java java-10 sunpkcs11

我正在进行从Java 8到Java 10的迁移,我使用类SunPKCS11和DialogCallbackHandler定义了提供程序, 从版本9开始,我注意到此类不再存在, 这是我的代码:

CallbackHandler callbackHandler = new DialogCallbackHandler ();
AuthProvider provider;
provider = new sun.security.pkcs11.SunPKCS11 (new ByteArrayInputStream (
("name =" + name + "\ n" + "library =" + library + "\ n" + "attributes =    compatibility"). getBytes ()
));

provider.setCallbackHandler (CallbackHandler);
Security.addProvider (provider);

您对替换sun.security.pkcs11.SunPKCS11的标准Java类有想法吗

先谢谢您

0 个答案:

没有答案