如何从DialogCallbackHandler获取密码

发布于 2025-01-05 01:18:57 字数 364 浏览 1 评论 0原文

我正在与包含数字证书的金雅拓智能卡合作。我使用 DialogCallbackHandler 传递 PIN 以便能够加载密钥库:

KeyStore.Builder ksBuilder = KeyStore.Builder.newInstance("PKCS11", provider, new KeyStore.CallbackHandlerProtection(new DialogCallbackHandler()));
KeyStore ks = ksBuilder.getKeyStore();
ks.load(null, null);

问题是应用程序要求其必须签署的每个文档提供 PIN,但它不起作用。有什么方法可以兑现此 PIN 码吗?

i'am working with gemalto SmartCard witch contain a digital certificate. i used DialogCallbackHandler to pass the PIN to have the possibility to load the keystore:

KeyStore.Builder ksBuilder = KeyStore.Builder.newInstance("PKCS11", provider, new KeyStore.CallbackHandlerProtection(new DialogCallbackHandler()));
KeyStore ks = ksBuilder.getKeyStore();
ks.load(null, null);

The trouble is that the application is asking for the PIN for each document it has to sign, and it is not operative. is there any method to cash this PIN.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文