minidriver: when reading 'cardid' file return the content of 'cardid' file ...
'cardid' size is 16 bytes. It's initialized by the 'empty-cardid' value (00-0F) overwritten (from left) by the last 16 (or less) bytes of the card's serial. git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5513 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
ee4f346b07
commit
319cb6f071
|
@ -769,14 +769,12 @@ DWORD WINAPI CardReadFile(__in PCARD_DATA pCardData,
|
|||
{
|
||||
if(strcmp(pszFileName, "cardid") == 0)
|
||||
{
|
||||
*pcbData = strlen(vs->p15card->tokeninfo->serial_number) + 10;
|
||||
*pcbData = sizeof(vs->cardFiles.file_cardid);
|
||||
*ppbData = pCardData->pfnCspAlloc(*pcbData);
|
||||
if(!*ppbData)
|
||||
{
|
||||
return SCARD_E_NO_MEMORY;
|
||||
}
|
||||
|
||||
strcpy(*ppbData, vs->p15card->tokeninfo->serial_number);
|
||||
memcpy(*ppbData, &(vs->cardFiles.file_cardid), *pcbData);
|
||||
|
||||
logprintf(pCardData, 7, "return cardid ");
|
||||
loghex(pCardData, 7, *ppbData, *pcbData);
|
||||
|
|
Loading…
Reference in New Issue