81 |
PBYTE pbApplicationIdentifier = NULL; |
PBYTE pbApplicationIdentifier = NULL; |
82 |
DWORD dwCapabilitiesSize, |
DWORD dwCapabilitiesSize, |
83 |
dwCardCapabilitiesSize, |
dwCardCapabilitiesSize, |
84 |
dwApplicationIdentifierSize; |
dwApplicationIdentifierSize, |
85 |
|
dwExtendedCapabilitiesSize; |
86 |
BYTE bCategoryIndicator, bStatusIndicator; |
BYTE bCategoryIndicator, bStatusIndicator; |
87 |
__try |
__try |
88 |
{ |
{ |
153 |
dwReturn = SCARD_E_UNEXPECTED; |
dwReturn = SCARD_E_UNEXPECTED; |
154 |
__leave; |
__leave; |
155 |
} |
} |
156 |
//dwReturn = SCardReadFile(pCardData, szOpenPGPDir, szOpenPGPExtendedCap, &pbExtendedCapabilities, &dwExtendedCapabilitiesSize); |
dwReturn = SCardReadFile(pCardData, szOpenPGPDir, szOpenPGPExtendedCap, &pbExtendedCapabilities, &dwExtendedCapabilitiesSize); |
157 |
if (dwReturn) |
if (dwReturn) |
158 |
{ |
{ |
159 |
//__leave; |
__leave; |
160 |
} |
} |
161 |
pContext->fExtentedLeLcFields = ((pbCardCapabilities[2] & 0x40)?TRUE:FALSE); |
pContext->fExtentedLeLcFields = ((pbCardCapabilities[2] & 0x40)?TRUE:FALSE); |
162 |
pContext->fSupportCommandChaining = ((pbCardCapabilities[2] & 0x80)?TRUE:FALSE); |
pContext->fSupportCommandChaining = ((pbCardCapabilities[2] & 0x80)?TRUE:FALSE); |
163 |
pContext->dwMaxLength = 0x0800;// pbCapabilities[8] * 256 + pbCapabilities[9]; |
pContext->bSecureMessagingAlgorithm = pbExtendedCapabilities[1]; |
164 |
|
pContext->dwMaxChallengeLength = pbExtendedCapabilities[2] * 0x100 + pbExtendedCapabilities[3]; |
165 |
|
pContext->dwMaxCertificateLength = pbExtendedCapabilities[4] * 0x100 + pbExtendedCapabilities[5]; |
166 |
|
pContext->dwMaxCommandDataLength = pbExtendedCapabilities[6] * 0x100 + pbExtendedCapabilities[7]; |
167 |
|
pContext->dwMaxResponseLength = pbExtendedCapabilities[8] * 0x100 + pbExtendedCapabilities[9]; |
168 |
dwReturn = CCIDgetFeatures(pCardData); |
dwReturn = CCIDgetFeatures(pCardData); |
169 |
if (dwReturn) |
if (dwReturn) |
170 |
{ |
{ |