I'm quite new so I'll try to explain my problem claerly: - I'm trying to make an RSA-decryption based application using a GPK16k smartcard plus a GP 410 (serial) reader. The OS is a RedHat 7.3 over a P-III. My app would make use of the OCF libs.
I'm gettings some errors while communicating with the smartcard.
I have installed:
- pcsc-lite 1.1.2 (form linuxnet) - GP 410 drivers from the ifd-gempc-0.8.0 (from Ludovic's home page) - OpenSC 0.8.0 (the latest, from opensc), compilled ok with pcsc support.
I have created /dev/pcsc, linked ttyS0, configured reader.conf: ==== FRIENDLYNAME "Gemplus PC 410" DEVICENAME GEMCORE LIBPATH /usr/lib/libGemPC410.so CHANNELID 0x0103F8 ====
- When I start pcscd,everything is ok, and here are the pcsc-lite's test results(testpcsc & muscletest apps): ======================== [EMAIL PROTECTED] src]# ./testpcsc
MUSCLE PC/SC Lite Test Program
Testing SCardEstablishContext : Command successful. Testing SCardGetStatusChange Please insert a working reader : Command successful. Testing SCardListReaders : Command successful. Reader 01: Gemplus PC 410 0 0 Enter the reader number : 01
Waiting for card insertion
: Command successful.
Testing SCardConnect : Command successful.
Testing SCardStatus : Command successful.
Current Reader Name : Gemplus PC 410 0 0
Current Reader State : 34
Current Reader Protocol : 0
Current Reader ATR Size : c
Current Reader ATR Value : 3B A7 00 40 18 80 65 A2 09 01 01 52
Testing SCardDisconnect : Command successful.
Testing SCardReleaseContext : Command successful.PC/SC Test Completed Successfully ! [EMAIL PROTECTED] src]# ./muscletest ********************************************************
Token #0 Token name : Token Unknown Slot name : Gemplus PC 410 0 0 Token id : 3BA70040188065A209010152 Token state : 34
******************************************************** Token #0 Token name : Token Unknown Slot name : Gemplus PC 410 0 0 Token id : 3BA70040188065A209010152 Token state : 34
EstablishConn returns : Token is unsupported ============================ but when I send operations to the card i keep getting error messages:: I.e: I'm sending a "Get Card Serial Number" command to the card: ============================ [EMAIL PROTECTED] pcsc]# opensc-tool -s 80:B8:00:00:08 Connecting to card in reader Gemplus PC 410 0 0... iso7816.c:100:iso7816_check_sw: Wrong parameter(s) P1-P2 <<<<<<<<ERROR MSG card-gpk.c:1659:gpk_get_info: Card returned error: Incorrect parameters in APDU <<<<<<<<ERROR MSG Using card driver: Gemplus GPK driver Sending: 80 B8 00 00 08 Received (SW1=0x90, SW2=0x00): 00 40 00 00 17 61 00 65 [EMAIL PROTECTED] ===== I attach here the pcscd log for the previous example. Notice the error msg "../common/GCCmds.c:501 (GemPC41x) Errror return by the card (SW is not 9000) "
Any hints? any ideas why this might be happening
===== [EMAIL PROTECTED] drivers]# /usr/local/pcsc/sbin/pcscd -d stderr -f pcscdaemon.c:265 main: debug messages to stderr pcscdaemon.c:256 main: pcscd set to foreground readerfactory.c:1318 RFInitializeReader: Attempting startup of Gemplus PC 410 0 0. readerfactory.c:1061 RFBindFunctions: Loading IFD Handler 2.0 ../common/ifdhandler.c:87 (GemPC41x) Entering IFDHCreateChannel (lun: 0) gbpserial.c:599 (GemPC41x) Serial port baudrate already set to 38400 (3) ../common/GCCmds.c:394 (GemPC41x) GCCmdSetMode gbpserial.c:605 (GemPC41x) GCCmdSetMode success (4.a) ../common/GCCmds.c:319 (GemPC41x) GCCmdGetOSVersion GemPC410Utils.c:41 (GemPC41x) OS string: GemCore-R1.21-GM ../common/GCCmds.c:394 (GemPC41x) GCCmdSetMode ../common/ifdhandler.c:158 (GemPC41x) entering IFDHGetCapabilities (lun: 0) pcscdaemon.c:473 main: pcsc-lite daemon ready. hotplug_linux.c:175 No bundle files in pcsc drivers directory: /usr/local/pcsc/drivers/ hotplug_linux.c:176 Disabling USB support for pcscd ../common/ifdhandler.c:295 (GemPC41x) entering IFDHPowerICC (lun: 0) ../common/GCCmds.c:242 (GemPC41x) GCCmdPowerUp eventhandler.c:466 EHSpawnEventHandler: Card inserted into Gemplus PC 410 0 0 EHSpawnEventHandler: Card ATR: 3B A7 00 40 18 80 65 A2 09 01 01 52 winscard_msg.c:263 SHMProcessEvents: Common channel packet arrival winscard.c:80 SCardEstablishContext: Establishing Context: 17004344 winscard.c:149 SCardConnect: Attempting Connect to Gemplus PC 410 0 0 winscard.c:245 SCardConnect: Active Protocol: 1 winscard.c:252 SCardConnect: hCard Identity: 1bf0b winscard.c:815 SCardBeginTransaction: Status: 0. winscard.c:1281 SCardTransmit: Send Protocol: 0 ../common/ifdhandler.c:395 (GemPC41x) entering IFDHTransmitToICC (lun: 0) ../common/GCUtils.c:51 (GemPC41x) Entering gemcore_ISO_OUTPUT_processing ../common/GCUtils.c:302 (GemPC41x) Entering gemcore_status_processing winscard.c:1281 SCardTransmit: Send Protocol: 0 ../common/ifdhandler.c:395 (GemPC41x) entering IFDHTransmitToICC (lun: 0) ../common/GCUtils.c:133 (GemPC41x) Entering gemcore_ISO_INPUT_processing ../common/GCUtils.c:302 (GemPC41x) Entering gemcore_status_processing ../common/GCCmds.c:501 (GemPC41x) Errror return by the card (SW is not 9000) <<<<<<<<ERROR MSG winscard.c:971 SCardEndTransaction: Status: 0. winscard.c:815 SCardBeginTransaction: Status: 0. winscard.c:1281 SCardTransmit: Send Protocol: 0 ../common/ifdhandler.c:395 (GemPC41x) entering IFDHTransmitToICC (lun: 0) ../common/GCUtils.c:51 (GemPC41x) Entering gemcore_ISO_OUTPUT_processing ../common/GCUtils.c:302 (GemPC41x) Entering gemcore_status_processing winscard.c:1281 SCardTransmit: Send Protocol: 0 ../common/ifdhandler.c:395 (GemPC41x) entering IFDHTransmitToICC (lun: 0) ../common/GCUtils.c:133 (GemPC41x) Entering gemcore_ISO_INPUT_processing ../common/GCUtils.c:302 (GemPC41x) Entering gemcore_status_processing ../common/GCCmds.c:501 (GemPC41x) Errror return by the card (SW is not 9000) winscard.c:971 SCardEndTransaction: Status: 0. winscard.c:641 SCardDisconnect: Active Contexts: 1 winscard.c:92 SCardReleaseContext: Releasing Context: 17004344 winscard.c:92 SCardReleaseContext: Releasing Context: 17004344 pcscdaemon.c:151 SVCServiceRun: Client 8 has disappeared. =====
_______________________________________________ Muscle mailing list [EMAIL PROTECTED] http://lists.musclecard.com/mailman/listinfo/muscle
