问题描述
我有一个受PKCS-11支持的智能卡吗?我只想检查我的智能卡是否工作正常.如何在Ubuntu上检查它?请指导我.我可以使用什么软件?我应该怎么做?
I've a PKCS-11 supported smartcard? I just want to check that my the smartcard is working fine or not. How can check it on Ubuntu? Please guide me. what software I can use? how what steps should I follow?
推荐答案
重要的是要了解 PKCS#11标准只是定义了C语言API ,以访问智能卡和其他类型的加密硬件(甚至软件).通常是由硬件供应商提供实现PKCS#11 API并能够访问硬件(在您的情况下为智能卡)的软件库(用于Windows的.dll,用于unix的.so等).您的应用程序通常会加载PKCS#11库并使用它提供的PKCS#11 API函数.
It is important to understand that PKCS#11 standard just defines the C language API to access smartcards and other types of cryptographic hardware (or even software). It is usually hardware vendor who provides software library (.dll for windows, .so for unix etc.) that implements PKCS#11 API and is able to access the hardware (smartcard in your case). Your application usually loads PKCS#11 library and uses PKCS#11 API functions it provides.
在大多数情况下,最好使用智能卡供应商提供的PKCS#11库,但是也有许多独立软件供应商,例如 AET 或 Aloaha 提供智能卡中间件(通常包含PKCS#11库的软件包),可以访问一堆广泛使用的智能卡.您还可以查看 OpenSC 项目,该项目提供了支持许多流行的智能卡和USB令牌.
In most cases it is the best to use PKCS#11 library provided by your smartcard vendor but there are also many independent software vendors such as A.E.T. or Aloaha who provide smartcard middleware (software package that usually contains PKCS#11 library) that can access a bunch of widely used smartcards. You can also take a look at OpenSC project which provides an open source PKCS#11 library that supports many popular smartcards and USB tokens.
现在让我们回到您的问题:
Now let's get back to your questions:
您必须检查是否存在实现PKCS#11 API并支持您的智能卡的库(开放源或商业库).如果可以找到这样的库,那么答案是肯定的.
You have to check whether there exists a library (open source or commercial) that implements PKCS#11 API and supports your smartcard. If you can find such a library then the answer is yes.
如果您已经具有PKCS#11库,则可以安装"opensc"软件包,该软件包提供了名为"pkcs11-tool"的命令行应用程序.您可以使用以下命令列出可通过PKCS#11库访问的读取器和卡:
If you already have PKCS#11 library then you can install "opensc" package which provides command line application called "pkcs11-tool". You can use following command to list readers and cards accessible via your PKCS#11 library:
pkcs11-tool --module your_pkcs11_library.so --list-slots
如果要使用OpenSC项目提供的PKCS#11库,则只需将"your_pkcs11_library.so"替换为"opensc-pkcs11.so"即可.
If you want to use PKCS#11 library provided by OpenSC project then just replace "your_pkcs11_library.so" with "opensc-pkcs11.so".
PKCS#11是广泛支持的标准,因此这个问题很难回答.我猜您想将智能卡使用开源应用程序,因为您提到了Ubuntu,因此以下是支持PKCS#11的知名应用程序的简短列表:
PKCS#11 is widely supported standard so this question is hard to answer. I guess you would like to use open source applications with your smartcard because you have mentioned Ubuntu so here is the short list of well known applications that support PKCS#11:
- Mozilla Firefox-支持数字签名和客户端身份验证
- Mozilla Thunderbird-支持电子邮件的数字签名
- LibreOffice-支持文档的数字签名
- TrueCrypt-支持磁盘加密
- OpenVPN-支持客户端身份验证
- OpenSSH-支持客户端身份验证
这篇关于如何检查智能卡在Linux上是否正常工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!