- ccid-emulator: propagating PACE capabilities to ccid descriptor of
- ccid-test: IOCTL_FEATURE_IFD_PIN_PROPERTIES is currently hardcoded and should be replaced by the value from GET_FEATURE_REQUEST - pcsclite_trunk.patch: fixed propagation of data from SCardControl to SecurePINSpecialVerify and SecurePINSpecialCapabilities git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@154 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
@@ -23,6 +23,9 @@
|
||||
#include <winscard.h>
|
||||
#include <reader.h>
|
||||
|
||||
/* XXX IOCTL_FEATURE_IFD_PIN_PROPERTIES */
|
||||
const static DWORD feature_execute_pace = 0x42330020;
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
@@ -87,17 +90,21 @@ main(int argc, char *argv[])
|
||||
goto err;
|
||||
|
||||
|
||||
rv = SCardControl(hCard, FEATURE_EXECUTE_PACE, pbSendBufferCapabilities,
|
||||
sizeof(pbSendBufferCapabilities), pbRecvBuffer,
|
||||
sizeof(pbRecvBuffer), &dwRecvLength);
|
||||
rv = SCardControl(hCard, feature_execute_pace,
|
||||
pbSendBufferCapabilities, sizeof(pbSendBufferCapabilities),
|
||||
pbRecvBuffer, sizeof(pbRecvBuffer), &dwRecvLength);
|
||||
if (rv < 0)
|
||||
goto err;
|
||||
printf("GetReadersPACECapabilities successfull, received %d bytes\n",
|
||||
dwRecvLength);
|
||||
|
||||
rv = SCardControl(hCard, FEATURE_EXECUTE_PACE, pbSendBufferEstablish,
|
||||
sizeof(pbSendBufferEstablish), pbRecvBuffer,
|
||||
sizeof(pbRecvBuffer), &dwRecvLength);
|
||||
rv = SCardControl(hCard, feature_execute_pace,
|
||||
pbSendBufferEstablish, sizeof(pbSendBufferEstablish),
|
||||
pbRecvBuffer, sizeof(pbRecvBuffer), &dwRecvLength);
|
||||
if (rv < 0)
|
||||
goto err;
|
||||
printf("EstablishPACEChannel successfull, received %d bytes\n",
|
||||
dwRecvLength);
|
||||
|
||||
|
||||
rv = SCardDisconnect(hCard, SCARD_LEAVE_CARD);
|
||||
|
||||
@@ -77,7 +77,8 @@ ccid_desc = {
|
||||
0x00FF), // Number of characters per line
|
||||
//.bPINSupport = 0,
|
||||
.bPINSupport = 0x1| // PIN Verification supported
|
||||
0x2, // PIN Modification supported
|
||||
0x2| // PIN Modification supported
|
||||
0x10, // PIN Special supported
|
||||
.bMaxCCIDBusySlots = 0x01,
|
||||
};
|
||||
|
||||
@@ -1075,8 +1076,9 @@ perform_unknown(const __u8 *in, __u8 **out, size_t *outlen)
|
||||
result->bMessageType = 0x84;
|
||||
break;
|
||||
default:
|
||||
sc_debug(ctx, "Unknown message type in request. "
|
||||
"Using bMessageType=0x%2x for output.", 0);
|
||||
sc_debug(ctx, "Unknown message type in request (0x%02x). "
|
||||
"Using bMessageType=0x%02x for output.",
|
||||
request->bMessageType, 0);
|
||||
result->bMessageType = 0;
|
||||
}
|
||||
result->dwLength = __constant_cpu_to_le32(0);
|
||||
|
||||
Reference in New Issue
Block a user