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

Diff of /trunk/OpenPGPminidriver/CardInitializationAndDeconstruct.c

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

revision 1 by vletoux, Tue Feb 23 19:18:59 2010 UTC revision 9 by vletoux, Mon Mar 15 09:47:30 2010 UTC
# Line 52  DWORD WINAPI CardAcquireContext( Line 52  DWORD WINAPI CardAcquireContext(
52                          dwReturn  = SCARD_E_INVALID_PARAMETER;                          dwReturn  = SCARD_E_INVALID_PARAMETER;
53                          __leave;                          __leave;
54                  }                  }
55                  dwReturn = CreateContext(pCardData);                  dwReturn = CreateContext(pCardData, dwFlags);
56                  if (dwReturn)                  if (dwReturn)
57                  {                  {
58                          __leave;                          __leave;
59                  }                  }
                 if (!(dwFlags & CARD_SECURE_KEY_INJECTION_NO_CARD_MODE))  
                 {  
                         if (pCardData->hSCardCtx == 0)  
                         {  
                                 Trace(WINEVENT_LEVEL_ERROR, L"pCardData->hSCardCtx == NULL");  
                                 dwReturn  = SCARD_E_INVALID_PARAMETER;  
                                 __leave;  
                         }  
                         if (pCardData->hScard == 0)  
                         {  
                                 Trace(WINEVENT_LEVEL_ERROR, L"pCardData->hScard == NULL");  
                                 dwReturn  = SCARD_E_INVALID_PARAMETER;  
                                 __leave;  
                         }  
                 }  
60    
                 dwReturn = CheckContext(pCardData);  
                 if (dwReturn)  
                 {  
                         __leave;  
                 }  
                 // select the application on the card  
                 dwReturn = SelectOpenPGPApplication(pCardData);  
                 if (dwReturn)  
                 {  
                         __leave;  
                 }  
61    
62                  /* CardInitializationAndDeconstruct.c */                  /* CardInitializationAndDeconstruct.c */
63                  pCardData->pfnCardDeleteContext           = CardDeleteContext;                  pCardData->pfnCardDeleteContext           = CardDeleteContext;
# Line 92  DWORD WINAPI CardAcquireContext( Line 66  DWORD WINAPI CardAcquireContext(
66                  pCardData->pfnCardAuthenticatePin         = CardAuthenticatePin;                  pCardData->pfnCardAuthenticatePin         = CardAuthenticatePin;
67                  pCardData->pfnCardGetChallenge            = CardGetChallenge;                  pCardData->pfnCardGetChallenge            = CardGetChallenge;
68                  pCardData->pfnCardAuthenticateChallenge   = CardAuthenticateChallenge;                  pCardData->pfnCardAuthenticateChallenge   = CardAuthenticateChallenge;
69                  // CardDeauthenticate not implemented                  
70                  pCardData->pfnCardDeauthenticate          = CardDeauthenticate;                  pCardData->pfnCardDeauthenticate          = NULL; //CardDeauthenticate;
71                  pCardData->pfnCardAuthenticateEx          = CardAuthenticateEx;                  pCardData->pfnCardAuthenticateEx          = CardAuthenticateEx;
72                  pCardData->pfnCardGetChallengeEx          = CardGetChallengeEx;                  pCardData->pfnCardGetChallengeEx          = CardGetChallengeEx;
73                  pCardData->pfnCardDeauthenticateEx        = CardDeauthenticateEx;                  pCardData->pfnCardDeauthenticateEx        = CardDeauthenticateEx;
# Line 170  DWORD WINAPI CardDeleteContext( Line 144  DWORD WINAPI CardDeleteContext(
144      __inout PCARD_DATA pCardData      __inout PCARD_DATA pCardData
145       )       )
146  {  {
147            DWORD dwReturn;
148          Trace(WINEVENT_LEVEL_VERBOSE, L"Enter");          Trace(WINEVENT_LEVEL_VERBOSE, L"Enter");
149          CleanContext(pCardData);          dwReturn = CleanContext(pCardData);
150          return 0;          Trace(WINEVENT_LEVEL_VERBOSE, L"dwReturn = 0x%08X",dwReturn);
151            return dwReturn;
152  }  }

Legend:
Removed from v.1  
changed lines
  Added in v.9

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26