/[openpgpmdrv]/trunk/OpenPGPminidriver/Context.h
ViewVC logotype

Contents of /trunk/OpenPGPminidriver/Context.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 12 - (show annotations)
Wed Mar 31 08:58:46 2010 UTC (15 years, 1 month ago) by vletoux
File MIME type: text/plain
File size: 2632 byte(s)
first msi Release
1 /* OpenPGP Smart Card Mini Driver
2 Copyright (C) 2009 Vincent Le Toux
3
4 This library is Free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License version 2.1 as published by the Free Software Foundation.
7
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Lesser General Public License for more details.
12
13 You should have received a copy of the GNU Lesser General Public
14 License along with this library; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 */
17
18
19 typedef struct _OPENPGP_AID
20 {
21 BYTE AidRid[5];
22 BYTE AidApplication[1];
23 BYTE AidVersion[2];
24 BYTE AidManufacturer[2];
25 BYTE AidSerialNumber[4];
26 BYTE AidRFU[2];
27 } OPENPGP_AID;
28
29 #define FEATURE_VERIFY_PIN_START 0x01
30 #define FEATURE_VERIFY_PIN_FINISH 0x02
31 #define FEATURE_MODIFY_PIN_START 0x03
32 #define FEATURE_MODIFY_PIN_FINISH 0x04
33 #define FEATURE_GET_KEY_PRESSED 0x05
34 #define FEATURE_VERIFY_PIN_DIRECT 0x06
35 #define FEATURE_MODIFY_PIN_DIRECT 0x07
36 #define FEATURE_MCT_READERDIRECT 0x08
37 #define FEATURE_MCT_UNIVERSAL 0x09
38 #define FEATURE_IFD_PIN_PROPERTIES 0x0A
39 #define FEATURE_ABORT 0x0B
40
41 typedef struct _FEATURES
42 {
43 DWORD VERIFY_PIN_START;
44 DWORD VERIFY_PIN_FINISH;
45 DWORD VERIFY_PIN_DIRECT;
46 DWORD MODIFY_PIN_START;
47 DWORD MODIFY_PIN_FINISH;
48 DWORD MODIFY_PIN_DIRECT;
49 DWORD ABORT;
50 DWORD GET_KEY_PRESSED;
51 } FEATURES, *PFEATURES;
52
53 #define KEYMAX 3
54 typedef struct _OPENPGP_CONTEXT
55 {
56 OPENPGP_AID Aid;
57 FEATURES SmartCardReaderFeatures;
58 BOOL fSupportCommandChaining;
59 BOOL fExtentedLeLcFields;
60 DWORD dwMaxChallengeLength;
61 DWORD dwMaxCertificateLength;
62 DWORD dwMaxCommandDataLength;
63 DWORD dwMaxResponseLength;
64 BOOL fHasKey[KEYMAX];
65 BOOL fIsReadOnly;
66 BYTE bFingerPrint[60];
67 PBYTE pbModulusInLittleEndian[KEYMAX];
68 WORD dwModulusSizeInBytes[KEYMAX];
69 DWORD dwExponent[KEYMAX];
70 LARGE_INTEGER LastCacheCheck[KEYMAX];
71 BOOL fDoesTheAdminHasBeenAuthenticatedAtLeastOnce;
72 ALG_ID aiSecureMessagingAlg;
73 } OPENPGP_CONTEXT, *POPENPGP_CONTEXT ;
74
75 DWORD CreateContext(__in PCARD_DATA pCardData, __in DWORD dwFlags);
76 DWORD CheckContext(__in PCARD_DATA pCardData);
77 DWORD CleanContext(__in PCARD_DATA pCardData);

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26