/[openpgpmdrv]/trunk/OpenPGPminidriverTest/CryptoOperations.cpp
ViewVC logotype

Diff of /trunk/OpenPGPminidriverTest/CryptoOperations.cpp

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

revision 9 by vletoux, Tue Mar 2 18:54:34 2010 UTC revision 10 by vletoux, Mon Mar 15 18:23:17 2010 UTC
# Line 37  DWORD GenerateNewKey(DWORD dwIndex) Line 37  DWORD GenerateNewKey(DWORD dwIndex)
37                          dwKeySpec = AT_SIGNATURE;                          dwKeySpec = AT_SIGNATURE;
38                          PinId = ROLE_USER;                          PinId = ROLE_USER;
39                          break;                          break;
40                  case 1: //Authentication,                  case 2: //Authentication,
41                          dwKeySpec = AT_SIGNATURE;                          dwKeySpec = AT_SIGNATURE;
42                          PinId = 3;                          PinId = 3;
43                          break;                          break;
44                  case 2: // Confidentiality,                  case 1: // Confidentiality,
45                          dwKeySpec = AT_KEYEXCHANGE;                          dwKeySpec = AT_KEYEXCHANGE;
46                          PinId = 4;                          PinId = 4;
47                          break;                          break;
# Line 97  DWORD ImportKey(DWORD dwIndex) Line 97  DWORD ImportKey(DWORD dwIndex)
97                          dwKeySpec = AT_SIGNATURE;                          dwKeySpec = AT_SIGNATURE;
98                          PinId = ROLE_USER;                          PinId = ROLE_USER;
99                          break;                          break;
100                  case 1: //Authentication,                  case 2: //Authentication,
101                          dwKeySpec = AT_SIGNATURE;                          dwKeySpec = AT_SIGNATURE;
102                          PinId = 3;                          PinId = 3;
103                          break;                          break;
104                  case 2: // Confidentiality,                  case 1: // Confidentiality,
105                          dwKeySpec = AT_KEYEXCHANGE;                          dwKeySpec = AT_KEYEXCHANGE;
106                          PinId = 4;                          PinId = 4;
107                          break;                          break;
# Line 251  DWORD SetTheSameKeyForAllContainers() Line 251  DWORD SetTheSameKeyForAllContainers()
251                                  dwKeySpec = AT_SIGNATURE;                                  dwKeySpec = AT_SIGNATURE;
252                                  PinId = ROLE_USER;                                  PinId = ROLE_USER;
253                                  break;                                  break;
254                          case 1: //Authentication,                          case 2: //Authentication,
255                                  dwKeySpec = AT_SIGNATURE;                                  dwKeySpec = AT_SIGNATURE;
256                                  PinId = 3;                                  PinId = 3;
257                                  break;                                  break;
258                          case 2: // Confidentiality,                          case 1: // Confidentiality,
259                                  dwKeySpec = AT_KEYEXCHANGE;                                  dwKeySpec = AT_KEYEXCHANGE;
260                                  PinId = 4;                                  PinId = 4;
261                                  break;                                  break;
# Line 315  DWORD SetTheSameKeyForAllContainers() Line 315  DWORD SetTheSameKeyForAllContainers()
315                          CryptReleaseContext(hProv,0);                          CryptReleaseContext(hProv,0);
316          }          }
317          return dwReturn;          return dwReturn;
318    }
319    DWORD SetReadOnly(BOOL fSet)
320    {
321            DWORD dwReturn;
322            __try
323            {
324                    if (!pCardData)
325                    {
326                            dwReturn = SCARD_E_COMM_DATA_LOST;
327                            __leave;
328                    }
329                    dwReturn = pCardData->pfnCardSetProperty(pCardData, CP_CARD_READ_ONLY, (PBYTE) &fSet, sizeof(BOOL),0);
330            }
331            __finally
332            {
333            }
334            return dwReturn;
335  }  }

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26