|
1 /* |
|
2 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __T_TCERTSTOREDEFS_H__ |
|
20 #define __T_TCERTSTOREDEFS_H__ |
|
21 |
|
22 #include <e32std.h> |
|
23 #include <e32base.h> |
|
24 #include <securityerr.h> |
|
25 |
|
26 _LIT(KTokenTypeClientPanic, "TOKENTYPECLIENT"); |
|
27 |
|
28 //action types |
|
29 _LIT8(KCreateFileKeyStore, "createfilekeystore"); |
|
30 |
|
31 _LIT8(KInitStore, "init"); |
|
32 _LIT8(KOnlyCreateStore, "onlycreate"); |
|
33 _LIT8(KDeleteStore, "delete"); |
|
34 _LIT8(KAddKey, "addkey"); |
|
35 _LIT8(KListKeys, "listkeys"); |
|
36 _LIT8(KListAllKeys, "listallkeys"); |
|
37 _LIT8(KDeleteKeys, "deletekeys"); |
|
38 _LIT8(KImportKey, "importkey"); |
|
39 _LIT8(KExportKey, "exportkey"); |
|
40 _LIT8(KExportPublicKey, "exportpublickey"); |
|
41 _LIT8(KCompare, "compare"); |
|
42 _LIT8(KGetKeyInfo, "getkeyinfo"); |
|
43 _LIT8(KOpenKey, "open"); |
|
44 _LIT8(KMemFail, "memfail"); |
|
45 _LIT8(KTestOOM, "testoom"); |
|
46 _LIT8(KSign, "sign"); |
|
47 _LIT8(KDecrypt, "decrypt"); |
|
48 _LIT8(KDerive, "derive"); |
|
49 _LIT8(KDeleteKeystoreData, "deletekeystoredata"); |
|
50 _LIT8(KSetUsers, "setusers"); |
|
51 _LIT8(KSetTimeout, "settimeout"); |
|
52 _LIT8(KRelockStore, "relockstore"); |
|
53 _LIT8(KSetClientUid, "setclientuid"); |
|
54 _LIT8(KChangePassphrase, "changepassphrase"); |
|
55 _LIT8(KListProtectedObjects, "listprotectedobjects"); |
|
56 _LIT8(KUnblockPassphrase, "unblockpassphrase"); |
|
57 _LIT8(KAuthOpen, "authopen"); |
|
58 _LIT8(KAuthClose, "authclose"); |
|
59 _LIT8(KGetTimeRemaining, "timeremaining"); |
|
60 _LIT8(KAuthSetTimeout, "authsettimeout"); |
|
61 _LIT8(KGetTimeout, "gettimeout"); |
|
62 _LIT8(KSetTime, "settime"); |
|
63 _LIT8(KCorrupt, "corrupt"); |
|
64 _LIT8(KGetUsePolicy, "getusepolicy"); |
|
65 _LIT8(KSetUsePolicy, "setusepolicy"); |
|
66 _LIT8(KGetManagementPolicy, "getmanagementpolicy"); |
|
67 _LIT8(KSetManagementPolicy, "setmanagementpolicy"); |
|
68 _LIT8(KKeyStoreLabel, "getkeystorelabel"); |
|
69 |
|
70 // Action types for the key store |
|
71 _LIT8(KUnifiedKeyStoreInit, "UnifiedKeyStore Init"); |
|
72 _LIT8(KUnifiedKeyStoreDelete, "UnifiedKeyStore Delete"); |
|
73 _LIT8(KUnifiedKeyStoreKeyStoreCount, "UnifiedKeyStore KeyStoreCount"); |
|
74 _LIT8(KUnifiedKeyStoreList, "UnifiedKeyStore List"); |
|
75 |
|
76 _LIT8(KNumberOfStoresStart, "<numberofstores>"); |
|
77 _LIT8(KNumberOfStoresEnd, "</numberofstores>"); |
|
78 |
|
79 _LIT8(KCCTTokenTypeInfoAttributes, "CCTTokenTypeInfo Attributes"); |
|
80 |
|
81 _LIT8(KStoreIndexStart, "<storeindex>"); |
|
82 _LIT8(KStoreIndexEnd, "</storeindex>"); |
|
83 |
|
84 _LIT8(KTextStart, "<text>"); |
|
85 _LIT8(KTextEnd, "</text>"); |
|
86 |
|
87 // tags for indexing keystores |
|
88 _LIT8(KKeystoreStart, "<keystore>"); |
|
89 _LIT8(KKeystoreEnd, "</keystore>"); |
|
90 |
|
91 //tags |
|
92 _LIT8(KModeStart, "<mode>"); |
|
93 _LIT8(KModeEnd, "</mode>"); |
|
94 |
|
95 //tags for adding clients |
|
96 _LIT8(KNameStart, "<name>"); |
|
97 _LIT8(KNameEnd, "</name>"); |
|
98 |
|
99 //tags for expected result |
|
100 _LIT8(KReturnStart, "<return>"); |
|
101 _LIT8(KReturnEnd, "</return>"); |
|
102 |
|
103 _LIT8(KTokenTypeStart, "<tokentype>"); |
|
104 _LIT8(KTokenTypeEnd, "</tokentype>"); |
|
105 _LIT8(KTokenStart, "<token>"); |
|
106 _LIT8(KTokenEnd, "</token>"); |
|
107 _LIT8(KObjectStart, "<object>"); |
|
108 _LIT8(KObjectEnd, "</object>"); |
|
109 |
|
110 _LIT8(KKeyUsageStart, "<keyusage>"); |
|
111 _LIT8(KKeyUsageEnd, "</keyusage>"); |
|
112 |
|
113 // Key usages |
|
114 _LIT8(KKeyUsageNone, "none"); |
|
115 _LIT8(KAllKeyUsages, "allusages"); |
|
116 _LIT8(KEncryptUsage, "Encrypt"); |
|
117 _LIT8(KDecryptUsage, "Decrypt"); |
|
118 _LIT8(KSignUsage, "Sign"); |
|
119 _LIT8(KSignRecoverUsage, "SignRecover"); |
|
120 _LIT8(KWrapUsage, "Wrap"); |
|
121 _LIT8(KUnwrapUsage, "Unwrap"); |
|
122 _LIT8(KVerifyUsage, "Verify"); |
|
123 _LIT8(KVerifyRecoverUsage, "VerifyRecover"); |
|
124 _LIT8(KDeriveUsage, "Derive"); |
|
125 _LIT8(KNR, "NR"); |
|
126 _LIT8(KAllKeyUsagesExceptNR, "allusagesbutNR"); |
|
127 _LIT8(KDSAUsage, "DSAUsage"); |
|
128 |
|
129 _LIT8(KKeySizeStart, "<keysize>"); |
|
130 _LIT8(KKeySizeEnd, "</keysize>"); |
|
131 |
|
132 _LIT8(KKeyLabelStart, "<keylabel>"); |
|
133 _LIT8(KKeyLabelEnd, "</keylabel>"); |
|
134 |
|
135 _LIT8(KKeyAlgorithmStart, "<keyalgorithm>"); |
|
136 _LIT8(KKeyAlgorithmEnd, "</keyalgorithm>"); |
|
137 _LIT8(KAlgRSA, "RSA"); |
|
138 _LIT8(KAlgDSA, "DSA"); |
|
139 _LIT8(KAlgDH, "DH"); |
|
140 _LIT8(KAlgBAD, "BAD"); |
|
141 |
|
142 _LIT8(KKeyExportableStart, "<keyexportable>"); |
|
143 _LIT8(KKeyExportableEnd, "</keyexportable>"); |
|
144 _LIT8(KIsExportable, "IsExportable"); |
|
145 _LIT8(KIsNotExportable, "IsNotExportable"); |
|
146 |
|
147 _LIT8(KKeyAccessTypeStart, "<keyaccesstype>"); |
|
148 _LIT8(KKeyAccessTypeEnd, "</keyaccesstype>"); |
|
149 _LIT8(KExtractable, "Extractable"); |
|
150 _LIT8(KSensitive, "Sensitive"); |
|
151 _LIT8(KAlwaysSensitive, "AlwaysSensitive"); |
|
152 _LIT8(KNeverExtractable, "NeverExtractable"); |
|
153 _LIT8(KLocal, "Local"); |
|
154 |
|
155 _LIT8(KKeyNativeStart, "<native>"); |
|
156 _LIT8(KKeyStartDateStart, "<startdate>"); |
|
157 _LIT8(KKeyEndDateStart, "<enddate>"); |
|
158 |
|
159 _LIT8(KListCountStart, "<listcount>"); |
|
160 _LIT8(KListCountEnd, "</listcount>"); |
|
161 |
|
162 _LIT8(KFoundKeyStart, "<foundkey>"); |
|
163 _LIT8(KFoundKeyEnd, "</foundkey>"); |
|
164 |
|
165 _LIT8(KDeleteCountStart, "<deletecount>"); |
|
166 _LIT8(KDeleteCountEnd, "</deletecount>"); |
|
167 |
|
168 _LIT8(KNonExistentKeyStart, "<nonexistent>"); |
|
169 _LIT8(KNonExistentKeyEnd, "</nonexistent>"); |
|
170 |
|
171 // Tag for key import |
|
172 _LIT8(KImportEncrypted, "<encrypted>"); |
|
173 _LIT8(KImportEncryptedEnd, "</encrypted>"); |
|
174 |
|
175 _LIT8(KImportDataFile, "<ImportData>"); |
|
176 _LIT8(KImportDataFileEnd, "</ImportData>"); |
|
177 |
|
178 _LIT8(KOpenStart, "<open>"); |
|
179 _LIT8(KOpenEnd, "</open>"); |
|
180 |
|
181 _LIT8(KSignDigestStart, "<signdigest>"); |
|
182 _LIT8(KSignDigestEnd, "</signdigest>"); |
|
183 |
|
184 // Tags for key export |
|
185 _LIT8(KExportDataFile, "<ExportFile>"); |
|
186 _LIT8(KExportDataFileEnd, "</ExportFile>"); |
|
187 |
|
188 _LIT8(KExportEncrypted, "<encrypted>"); |
|
189 _LIT8(KExportEncryptedEnd, "</encrypted>"); |
|
190 |
|
191 _LIT8(KExportEncryptedCipher, "<cipher>"); |
|
192 _LIT8(KExportEncryptedCipherEnd, "</cipher>"); |
|
193 |
|
194 _LIT8(KExportCipherKeyLength, "<keylength>"); |
|
195 _LIT8(KExportCipherKeyLengthEnd, "</keylength>"); |
|
196 |
|
197 _LIT8(KExportCipherItarations, "<iterations>"); |
|
198 _LIT8(KExportCipherItarationsEnd, "</iterations>"); |
|
199 |
|
200 |
|
201 // Tags for compare |
|
202 _LIT8(KOriginalFile, "<originalfile>"); |
|
203 _LIT8(KOriginalFileEnd, "</originalfile>"); |
|
204 _LIT8(KNewFile, "<newfile>"); |
|
205 _LIT8(KNewFileEnd, "</newfile>"); |
|
206 |
|
207 // t_secdlg tags |
|
208 _LIT8(KSecDlg, "<passphrase>"); |
|
209 _LIT8(KSecDlgEnd, "</passphrase>"); |
|
210 _LIT(KSecDlgImport, "import"); |
|
211 _LIT(KSecDlgExport, "export"); |
|
212 _LIT(KSecDlgChange, "change"); |
|
213 _LIT(KSecDlgCreate, "create"); |
|
214 |
|
215 // t_secdlg filenames |
|
216 _LIT(KTSecDlgInputFile, "\\t_secdlg_in.dat"); |
|
217 _LIT(KTSecDlgOutputFile, "\\t_secdlg_out.dat"); |
|
218 //_LIT8(KExportPassphrase, "<exportpassphrase>"); |
|
219 //_LIT8(KExportPassphraseEnd, "</exportpassphrase>"); |
|
220 |
|
221 // t_secdlg operations |
|
222 _LIT(KTSecDlgEnterPIN, "EEnterPIN"); |
|
223 _LIT(KTSecDlgChangePIN, "EChangePIN"); |
|
224 |
|
225 // Tag for server OOM testing |
|
226 _LIT8(KServerOOMTest, "<serveroom>"); |
|
227 _LIT8(KServerOOMTestEnd, "</serveroom>"); |
|
228 |
|
229 // Tag for cancel testing |
|
230 _LIT8(KCancelCreateKeyStart, "<cancelcreatekey>"); |
|
231 _LIT8(KCancelCreateKeyEnd, "</cancelcreatekey>"); |
|
232 |
|
233 _LIT8(KNoCancel, "NoCancel"); |
|
234 _LIT8(KPreCreateKeyCall, "PreCreateCancel"); |
|
235 _LIT8(KPostCreateKeyCall, "PostCreateCancel"); |
|
236 |
|
237 // strings representing potential errors returned |
|
238 _LIT8(KErrNoneString, "KErrNone"); |
|
239 _LIT8(KErrAccessDeniedString, "KErrAccessDenied"); |
|
240 _LIT8(KErrNotReadyString, "KErrNotReady"); |
|
241 _LIT8(KErrAlreadyExistsString, "KErrAlreadyExists"); |
|
242 _LIT8(KErrInUseString, "KErrInUse"); |
|
243 _LIT8(KErrNotFoundString, "KErrNotFound"); |
|
244 _LIT8(KErrBadNameString, "KErrBadName"); |
|
245 _LIT8(KErrArgumentString, "KErrArgument"); |
|
246 _LIT8(KErrCancelString, "KErrCancel"); |
|
247 _LIT8(KErrCorruptString, "KErrCorrupt"); |
|
248 _LIT8(KErrNotSupportedString, "KErrNotSupported"); |
|
249 _LIT8(KErrOverflowString, "KErrOverflow"); |
|
250 _LIT8(KErrBadPassphraseString, "KErrBadPassphrase"); |
|
251 _LIT8(KErrGeneralString, "KErrGeneral"); |
|
252 _LIT8(KErrKeyAlgorithmString, "KErrKeyAlgorithm"); |
|
253 _LIT8(KErrKeyUsageString, "KErrKeyUsage"); |
|
254 _LIT8(KErrKeyValidityString, "KErrKeyValidity"); |
|
255 _LIT8(KErrKeySizeString, "KErrKeySize"); |
|
256 _LIT8(KErrKeyAccessString, "KErrKeyAccess"); |
|
257 _LIT8(KErrPrivateKeyNotFoundString, "KErrPrivateKeyNotFound"); |
|
258 _LIT8(KErrPermissionDeniedString, "KErrPermissionDenied"); |
|
259 |
|
260 // tags for auth object testing |
|
261 _LIT8(KTimeoutStart, "<timeout>"); |
|
262 _LIT8(KOwnerStart, "<owner>"); |
|
263 _LIT8(KUserStart, "<user>"); |
|
264 _LIT8(KUserEnd, "</user>"); |
|
265 _LIT8(KUidStart, "<uid>"); |
|
266 |
|
267 // Corruption tag |
|
268 _LIT8(KCorruptData, "<corruption>"); |
|
269 _LIT8(KCorruptDataEnd, "</corruption>"); |
|
270 |
|
271 _LIT8(KHomeTimeStart, "<hometime>"); |
|
272 |
|
273 _LIT8(KPolicyStart, "<policy>"); |
|
274 |
|
275 // Location of keystore data file |
|
276 _LIT(KKeystoreDataPath, "\\private\\101F72A6\\keys.dat"); |
|
277 |
|
278 // tags for enabling interface count check |
|
279 _LIT8(KCheckStoreCountStart, "<CheckStoreCount>"); |
|
280 _LIT8(KCheckStoreCountEnd, "</CheckStoreCount>"); |
|
281 |
|
282 // tags for checking manager interface count |
|
283 _LIT8(KManagerCountStart, "<KeyStoreManagerCount>"); |
|
284 _LIT8(KManagerCountEnd, "</KeyStoreManagerCount>"); |
|
285 |
|
286 // tags for checking total interface count |
|
287 _LIT8(KStoreCountStart, "<KeyStoreCount>"); |
|
288 _LIT8(KStoreCountEnd, "</KeyStoreCount>"); |
|
289 |
|
290 // tags for enabling interface count check |
|
291 _LIT8(KCheckKeyStoreLabelStart, "<CheckKeyStoreLabel>"); |
|
292 _LIT8(KCheckKeyStoreLabelEnd, "</CheckKeyStoreLabel>"); |
|
293 |
|
294 // tags for retrieving key store label |
|
295 _LIT8(KKeyStoreIndexStart, "<keystoreindex>"); |
|
296 _LIT8(KKeyStoreIndexEnd, "</keystoreindex>"); |
|
297 |
|
298 // tags for retrieving key store label |
|
299 _LIT8(KKeyStoreLabelStart, "<keystorelabel>"); |
|
300 _LIT8(KKeyStoreLabelEnd, "</keystorelabel>"); |
|
301 |
|
302 #endif // __T_TCERTSTOREDEFS_H__ |