- renamed Special PIN Verification/Capabilities to PACE Verification/Capabilities
- fixed PIN PACE support in ccid descriptor - using uint16_t instead of WORD in PACE structures - fixed lengthInputData to host byteorder - fixed parsing input buffer of SCardControl with FEATURE_EXECUTE_PACE - parsing input buffer for PACE verification and adjusting the byteorder - added 30s timeout to for PACE verification - triggering PACE via PC/SC now works although quite unstable git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@155 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
@@ -43,7 +43,7 @@ main(int argc, char *argv[])
|
||||
BYTE pbSendBufferEstablish [] = {
|
||||
0x02, /* idxFunction = EstabishPACEChannel */
|
||||
0x00, /* lengthInputData */
|
||||
0x04, /* lengthInputData */
|
||||
0x00, /* lengthInputData */
|
||||
0x03, /* PACE with PIN */
|
||||
0x00, /* length CHAT */
|
||||
0x00, /* length certificate description */
|
||||
@@ -52,6 +52,9 @@ main(int argc, char *argv[])
|
||||
BYTE pbRecvBuffer[1024];
|
||||
DWORD dwActiveProtocol, dwRecvLength, dwReaders;
|
||||
|
||||
uint16_t lengthInputData = 4;
|
||||
memcpy(pbSendBufferEstablish + 1, &lengthInputData, 2);
|
||||
|
||||
if (argc > 1) {
|
||||
if (argc > 2 || sscanf(argv[1], "%d", &num) != 1) {
|
||||
fprintf(stderr, "Usage: %s [reader_num]\n", argv[0]);
|
||||
|
||||
@@ -78,7 +78,8 @@ ccid_desc = {
|
||||
//.bPINSupport = 0,
|
||||
.bPINSupport = 0x1| // PIN Verification supported
|
||||
0x2| // PIN Modification supported
|
||||
0x10, // PIN Special supported
|
||||
0x10| // PIN PACE Capabilities supported
|
||||
0x20, // PIN PACE Verification supported
|
||||
.bMaxCCIDBusySlots = 0x01,
|
||||
};
|
||||
|
||||
@@ -776,6 +777,7 @@ perform_PC_to_RDR_Secure(const __u8 *in, __u8** out, size_t *outlen)
|
||||
goto err;
|
||||
|
||||
if (request->wLevelParameter != CCID_WLEVEL_DIRECT) {
|
||||
sc_error(ctx, "Chained security commands not supported.");
|
||||
sc_result = SC_ERROR_NOT_SUPPORTED;
|
||||
goto err;
|
||||
}
|
||||
@@ -818,7 +820,7 @@ perform_PC_to_RDR_Secure(const __u8 *in, __u8** out, size_t *outlen)
|
||||
abData + 1, &abDataOut, &resplen);
|
||||
goto err;
|
||||
break;
|
||||
case 0x11:
|
||||
case 0x20:
|
||||
sc_result = EstablishPACEChannel(&sctx,
|
||||
card_in_slot[request->bSlot], abData + 1, &abDataOut,
|
||||
&resplen, &sctx);
|
||||
|
||||
Reference in New Issue
Block a user