智能卡编程环境搭建-libusb,ccid,pcsc-lite,opensc

本文详细介绍了在Linux系统中如何安装和配置libusb、ccid、pcsc-lite和opensc来搭建智能卡编程环境。包括下载安装包、编译安装、解决依赖问题以及测试各个组件的过程。
摘要由CSDN通过智能技术生成

原文转载:Linux 平台下 Libusb & ccid & pcsc-lite & Opensc
一、libusb 安装步骤:
1.下载安装包:
https://sourceforge.net/projects/libusb/files/latest/download

2.解压安装包:
$ tar zxvf libusb-版本号.tar.gz

3.编译且安装:

  $ cd libusb-版本号
  $ ./configure
  $ ./make
  $ ./make install <- 要有 root 权限,Ubuntu 下可以 sudo ./make install

4.运行做测试:
$ lsusb
显示出如下类似信息则为安装成功
Bus 002 Device 002: ID 413c:2105 Dell Computer Corp. Model L100 Keyboard

二、ccid 安装步骤:
1.下载安装包:
http://pcsclite.alioth.debian.org

2.解压安装包:
$ tar jxvf ccid-版本号.tar.bz2

3.编译且安装:

 $ cd ccid-版本号
  $ ./configure
  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
NEWS for OpenSC -- History of user visible changes Complete change history is available online: http://www.opensc-project.org/opensc/timeline New in 0.12.0; 2010-12-22 * OpenSC uses a single reader driver, specified at compile time. * New card driver: Italian eID (CNS) by Emanuele Pucciarelli. * New card driver: Portuguese eID by Jo茫o Poupino. * New card driver: westcos by Fran莽ois Leblanc. * pkcs11-tool can use a slot based on ID, label or index in the slot list. * PIN flags are updated from supported cards when C_GetTokenInfo is called. * Support for CardOS 4.4 cards added. * Fature to exclude readers from OpenSC PKCS#11 via "ignored_readers" configuration file entry. * #229: Support semi-automatic fixes to cards personalized with older and broken OpenSC versions. * Software keys removed from pkcs15-init and the PKCS#11 module. OpenSC can either generate keys on card or import plaintext keys to the card, but will never generate plaintext key material in software by itself. All traces of a software token (PKCS#15 Section 7) shall be removed. * Updates to PC/SC driver to build with pcsc-lite >= 1.6.2 * Build script for a binary Mac OS X installer for 10.5 and 10.6 systems. Binary installer includes OpenSC.tokend for platform integration. 10.6 installer includes engine_pkcs11. * Modify Rutoken S binary interfaces by Aktiv Co. * Support GOST R 34.10-2001 and GOST R 34.11-94 by Aktiv Co. * CardOS driver now emulates sign on rsa keys with sign+decrypt usage with padding and decrypt(). This is compatible with old cards and card initialized by Siemens software. Removed "--split-key" option, as it is no longer needed. * Improved debugging support: debug level 3 will show everything except of ASN1 and card matching debugging (usualy not needed). * Massive changes to libopensc. This library is now internal, only used by opensc-pkcs11.so and command line tools. Header files are no longer installed, library should not be used by other applications.
(messenger-libusb.cpp:42) control_transfer返回了错误,索引: 768,错误。 这个错误是指在messenger-libusb.cpp文件中的第42行,执行了一个名为control_transfer的函数,但该函数返回了错误。错误信息显示索引为768,但具体的错误原因并没有提供。 要解决这个问题,我们可以进行以下几步: 1. 检查索引是否超出了范围。索引通常用于引用某种数据或操作对象,如果超过了其有效范围,就会导致错误。检查代码中对该索引的使用,并确保其在合理的范围内。 2. 检查传递给control_transfer函数的参数是否正确。函数可能需要特定的参数或特定的格式。查看函数的文档或源代码,确保传递给它的参数是正确的。 3. 检查是否需要更新或更改相关的库文件。错误可能是由于库文件中的bug或不兼容性引起的。查看最新版本的库文件,并尝试更新或更改它们来修复错误。 4. 使用调试工具进行调试。通过使用调试器或日志记录器等工具,可以跟踪代码的执行过程,以便更容易发现错误所在。可以逐步执行代码并观察变量的值,以找出导致错误的原因。 5. 寻求帮助。如果以上方法都没有解决问题,可以向开发人员或相关论坛或社区寻求帮助。提供具体的错误信息和相关的代码片段,以便他们更好地理解问题并提供解决方案。 总之,错误(messenger-libusb.cpp:42) control_transfer返回了错误,索引: 768,错误表明在执行control_transfer函数时出现了问题。我们需要检查索引范围、参数正确性、库文件更新、调试等方面,以找出并解决问题。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值