21 |
#include "Context.h" |
#include "Context.h" |
22 |
#include "Smartcard.h" |
#include "Smartcard.h" |
23 |
#include "PublicDataOperations.h" |
#include "PublicDataOperations.h" |
24 |
|
#include "CryptoOperations.h" |
25 |
|
|
26 |
SCARD_ATRMASK SupportedATR [] = |
SCARD_ATRMASK SupportedATR [] = |
27 |
{ |
{ |
238 |
dwApplicationIdentifierSize, |
dwApplicationIdentifierSize, |
239 |
dwExtendedCapabilitiesSize, |
dwExtendedCapabilitiesSize, |
240 |
dwFingerPrintSize; |
dwFingerPrintSize; |
241 |
DWORD dwI; |
DWORD dwI, dwJ; |
242 |
BYTE bCategoryIndicator, bStatusIndicator; |
BYTE bCategoryIndicator, bStatusIndicator; |
243 |
POPENPGP_CONTEXT pContext; |
POPENPGP_CONTEXT pContext; |
244 |
__try |
__try |
349 |
dwReturn = SCARD_E_UNEXPECTED; |
dwReturn = SCARD_E_UNEXPECTED; |
350 |
__leave; |
__leave; |
351 |
} |
} |
352 |
pContext->fHasSignature = FALSE; |
memcpy(pContext->bFingerPrint, pbFingerPrint, 60); |
353 |
for( dwI = 0; dwI < 20; dwI++) |
for(dwJ = 0; dwJ < KeyMax; dwJ++) |
|
{ |
|
|
if (pbFingerPrint[dwI] != 0) |
|
|
{ |
|
|
pContext->fHasSignature = TRUE; |
|
|
break; |
|
|
} |
|
|
} |
|
|
pContext->fHasDecryption = FALSE; |
|
|
for( dwI = 20; dwI < 40; dwI++) |
|
|
{ |
|
|
if (pbFingerPrint[dwI] != 0) |
|
|
{ |
|
|
pContext->fHasDecryption = TRUE; |
|
|
break; |
|
|
} |
|
|
} |
|
|
pContext->fHasAuthentication = FALSE; |
|
|
for( dwI = 40; dwI < 60; dwI++) |
|
354 |
{ |
{ |
355 |
if (pbFingerPrint[dwI] != 0) |
pContext->fHasKey[dwJ] = FALSE; |
356 |
|
for( dwI = dwJ * 20; dwI < dwJ * 20 + 20; dwI++) |
357 |
{ |
{ |
358 |
pContext->fHasAuthentication = TRUE; |
if (pbFingerPrint[dwI] != 0) |
359 |
break; |
{ |
360 |
|
pContext->fHasKey[dwJ] = TRUE; |
361 |
|
break; |
362 |
|
} |
363 |
} |
} |
364 |
} |
} |
365 |
dwReturn = CCIDgetFeatures(pCardData); |
dwReturn = CCIDgetFeatures(pCardData); |