/[openpgpmdrv]/trunk/OpenPGPminidriver/ContextManagement.c
ViewVC logotype

Diff of /trunk/OpenPGPminidriver/ContextManagement.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 5 by vletoux, Tue Feb 23 19:18:59 2010 UTC revision 6 by vletoux, Thu Mar 4 21:17:51 2010 UTC
# Line 81  DWORD CreateContext(__in PCARD_DATA pCar Line 81  DWORD CreateContext(__in PCARD_DATA pCar
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          {          {
# Line 152  DWORD CreateContext(__in PCARD_DATA pCar Line 153  DWORD CreateContext(__in PCARD_DATA pCar
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                  {                  {

Legend:
Removed from v.5  
changed lines
  Added in v.6

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26