在提供PIN之前访问SmartCard数据
我正在开发一个数字签名解决方案,并希望从包含数字证书的智能卡中检索数据(卡片持有人的名称或证书的名称),然后在用户提供卡片的PIN。我知道其他解决方案,但是我还没有做同样的事情。
我正在使用以下Java API:
- Java PKCS#11(使用此API,我能够在将卡的内容加载到密钥库后,但仅在提供了PIN之后)和
- SmartCardio(使用SmartCardio(使用我能够测试终端中卡的存在或不存在的API)
我想知道是否有人可以提示。谢谢。
I'm developing a digital signature solution and would like to retrieve data (the name of the card holder or the subject of the certificate in the card) from a smartcard containing a digital certificate, BEFORE the user provides the card's pin. I'm aware of other solutions that do that, however I haven't been able to do the same.
I'm using the following Java APIs:
- Java PKCS#11 (with this API I have been able to get that information, after loading the contents of the card to a KeyStore, but only after the PIN has been provided) and
- smartcardio (with this API I have been able to test the presence or absence of the card in the terminal)
I wonder if anyone could have a hint. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该卡需要允许访问某些数据的内容取决于称为卡个性化的阶段,并且完全独立于使用的API。您应该紧急检查卡个性化文件所述。提示:如果您获得“不满足的安全状态”,0x6982,该卡似乎不支持您所需的方法。
在阅读了您的评论之后:看来您正在阅读本地证书存储,并且不与卡进行通信;您只需依靠一些魔术过程,然后又读了证书并存储了证书。这是一个完全不同的问题。
What the card requires to allow access to certain data depends on a stage called card personalization, and is completely independent from the used API. You should urgently check, what the card personalization documents state. Hint: if you get "security status not satisfied", 0x6982, the card seems not to support your desired approach.
After reading your comment: it seems, that you are reading the local certificate storage and don't communicate with the card; you just rely on some magic process having read and stored the certificate earlier. This is an entirely different question.