4.9 WFS_CMD_PIN_PRESENT_IDC

Description The PIN, which was entered with the WFS_PIN_GET_PIN command, is combined with the requisite data specified by the IDC presentation algorithm and presented to the smartcard contained in the ID Card unit. The result of the presentation is returned to the application. This command will clear the PIN.

Input Param LPWFSPINPRESENTIDC lpPresentIDC;

typedef struct _wfs_pin_presentidc
{
WORD wPresentAlgorithm;
WORD wChipProtocol;
ULONG ulChipDataLength;
LPBYTE lpbChipData;
LPVOID lpAlgorithmData;
} WFSPINPRESENTIDC, * LPWFSPINPRESENTIDC;

wPresentAlgorithm
Specifies the algorithm that is used for presentation. Possible values are: (see command WFS_INF_PIN_CAPABILITIES).

wChipProtocol
Identifies the protocol that is used to communicate with the chip. Possible values are: (see command WFS_INF_IDC_CAPABILITIES in the Identification Card Device Class Interface).

ulChipDataLength
Specifies the length of the byte stream pointed to by lpbChipData.

lpbChipData
Points to the data to be sent to the chip.

lpAlgorithmData
Pointer to a structure that contains the data required for the specified presentation algorithm.
For the WFS_PIN_PRESENT_CLEAR algorithm, this structure is defined as:

typedef struct _wfs_pin_presentclear
{
ULONG ulPINPointer;
USHORT usPINOffset;
} WFSPINPRESENTCLEAR, * LPWFSPINPRESENTCLEAR;

ulPINPointer

Describes the byte position where to insert the PIN in the lpbChipData buffer. The first byte of the lpbChipData buffer is numbered 0.

usPINOffset

Describes the bit position where to insert the PIN in the lpbChipData buffer. In each byte, the most-significant bit is numbered 0, the less significant bit is numbered 7.

Output Param LPWFSPINPRESENTRESULT lpPresentResult;

typedef struct _wfs_pin_present_result
{
WORD wChipProtocol;
ULONG ulChipDataLength;
LPBYTE lpbChipData;
} WFSPINPRESENTRESULT, * LPWFSPINPRESENTRESULT;

wChipProtocol
Identifies the protocol that was used to communicate with the chip. This field contains the same value as the corresponding field in the input structure.

ulChipDataLength
Specifies the length of the byte stream pointed to by lpbChipData.

lpbChipData
Points to the data responded from the chip.

Error Codes The following additional error codes can be generated by this command:

Value Meaning

WFS_ERR_PIN_INVALIDDATA An error occurred while communicating with the chip.

WFS_ERR_PIN_PROTOCOLNOTSUPP The specified protocol is not supported by the service provider.

WFS_ERR_PIN_NOPIN PIN has not been entered or has been cleared.

WFS_ERR_PIN_ACCESSDENIED The ID card unit is not ready for PIN presentation or for any vendor specific reason. The ID card service provider, if any, may have generated a service event that further describes the reason for that error code.

Events There are no additional events generated by this command.

Comments None.