|
1 //! Cancel2.txt |
|
2 //! Cancellation tests for the certificate addition, deletion, trust&application setting with notification |
|
3 //! to the client process. |
|
4 |
|
5 // Note: The in-source test tag is only added to the new tests for PREQ226. The tests without test tag is the existing tests |
|
6 // in the certstore component, which are used to set up the environment needed by the PREQ226 tests. |
|
7 |
|
8 // Setup /////////////////////////////////////////////////////////////////////// |
|
9 |
|
10 <action> |
|
11 <actionname>No Test,Opening a CertificateAppInfoManager</actionname> |
|
12 <actiontype>initappmanager</actiontype> |
|
13 <actionbody></actionbody> |
|
14 <actionresult> |
|
15 <return>KErrNone</return> |
|
16 </actionresult> |
|
17 </action> |
|
18 |
|
19 <action> |
|
20 <actionname>No Test,Adding client A1</actionname> |
|
21 <actiontype>addclient</actiontype> |
|
22 <actionbody> |
|
23 <name>A1</name> |
|
24 <uid>1</uid> |
|
25 </actionbody> |
|
26 <actionresult> |
|
27 <return>KErrNone</return> |
|
28 </actionresult> |
|
29 </action> |
|
30 |
|
31 <action> |
|
32 <actionname>No Test,Adding client A2</actionname> |
|
33 <actiontype>addclient</actiontype> |
|
34 <actionbody> |
|
35 <name>A2</name> |
|
36 <uid>2</uid> |
|
37 </actionbody> |
|
38 <actionresult> |
|
39 <return>KErrNone</return> |
|
40 </actionresult> |
|
41 </action> |
|
42 |
|
43 <action> |
|
44 <actionname>No Test,Adding client A3</actionname> |
|
45 <actiontype>addclient</actiontype> |
|
46 <actionbody> |
|
47 <name>A3</name> |
|
48 <uid>3</uid> |
|
49 </actionbody> |
|
50 <actionresult> |
|
51 <return>KErrNone</return> |
|
52 </actionresult> |
|
53 </action> |
|
54 |
|
55 <action> |
|
56 <actionname>No Test,Adding client A4</actionname> |
|
57 <actiontype>addclient</actiontype> |
|
58 <actionbody> |
|
59 <name>A4</name> |
|
60 <uid>4</uid> |
|
61 </actionbody> |
|
62 <actionresult> |
|
63 <return>KErrNone</return> |
|
64 </actionresult> |
|
65 </action> |
|
66 |
|
67 <action> |
|
68 <actionname>No Test,Deleting the CertificateAppInfoManager</actionname> |
|
69 <actiontype>deleteappmanager</actiontype> |
|
70 <actionbody></actionbody> |
|
71 <actionresult> |
|
72 <return>KErrNone</return> |
|
73 </actionresult> |
|
74 </action> |
|
75 |
|
76 <action> |
|
77 <actionname>Import a RSA key rsacertkey1</actionname> |
|
78 <actiontype>importkey</actiontype> |
|
79 <actionbody> |
|
80 <ImportData>rsacertkey1.txt</ImportData> |
|
81 <keyusage>AllUsagesButNR</keyusage> |
|
82 <keylabel>*IMPORTED* RSA key 1</keylabel> |
|
83 <keyaccesstype>Extractable</keyaccesstype> |
|
84 </actionbody> |
|
85 <actionresult> |
|
86 <return>KErrNone</return> |
|
87 </actionresult> |
|
88 </action> |
|
89 |
|
90 <action> |
|
91 <actionname>Opening a writable certificate store manager</actionname> |
|
92 <actiontype>init</actiontype> |
|
93 <actionbody> |
|
94 <mode>write</mode> |
|
95 </actionbody> |
|
96 <actionresult> |
|
97 <return>KErrNone</return> |
|
98 </actionresult> |
|
99 </action> |
|
100 |
|
101 <action> |
|
102 <actionname>Deleting all certs</actionname> |
|
103 <actiontype>deletecert</actiontype> |
|
104 <actionbody> |
|
105 <label>*.*</label> |
|
106 <deleteallcerts>1</deleteallcerts> |
|
107 </actionbody> |
|
108 <actionresult> |
|
109 <return>KErrNone</return> |
|
110 </actionresult> |
|
111 </action> |
|
112 |
|
113 <action> |
|
114 <actionname>Deleting the writable certificate store manager</actionname> |
|
115 <actiontype>delete</actiontype> |
|
116 <actionbody></actionbody> |
|
117 <actionresult> |
|
118 <return>KErrNone</return> |
|
119 </actionresult> |
|
120 </action> |
|
121 |
|
122 <action> |
|
123 <actionname>Enabling cancellation testing</actionname> |
|
124 <actiontype>startcancellation</actiontype> |
|
125 <actionresult> |
|
126 <return>KErrNone</return> |
|
127 </actionresult> |
|
128 </action> |
|
129 |
|
130 // Initialisation ////////////////////////////////////////////////////////////// |
|
131 |
|
132 <action> |
|
133 <actionname>Opening a writable certificate store manager</actionname> |
|
134 <actiontype>init</actiontype> |
|
135 <actionbody> |
|
136 <mode>write</mode> |
|
137 </actionbody> |
|
138 <actionresult> |
|
139 <return>KErrNone</return> |
|
140 </actionresult> |
|
141 </action> |
|
142 |
|
143 // Add certs /////////////////////////////////////////////////////////////////// |
|
144 |
|
145 //! @file |
|
146 //! @SYMTestCaseID UCTSSEC-CT-WModeUCTAddCCancelWN1.1 |
|
147 //! @SYMTestCaseDesc The test is to test cancellation of X509 CA certificate addition with notification. |
|
148 //! @SYMPREQ 226 |
|
149 //! @SYMTestCasePriority High |
|
150 //! @SYMTestExpectedResults KErrNone |
|
151 |
|
152 <action> |
|
153 <actionname>1.1, Cancel X509 CA certificate CAX1 addition with notification</actionname> |
|
154 <actiontype>addcert</actiontype> |
|
155 <actionbody> |
|
156 <format>X509</format> |
|
157 <label>CAX1</label> |
|
158 <issuerkey></issuerkey> |
|
159 <subjectkey></subjectkey> |
|
160 <certstore>0</certstore> |
|
161 <certfile>c:\unifiedcertstore2\CAX1.cer</certfile> |
|
162 <certowner>CA</certowner> |
|
163 <ChangeNotification>1</ChangeNotification> |
|
164 </actionbody> |
|
165 <actionresult> |
|
166 <return>KErrNone</return> |
|
167 </actionresult> |
|
168 </action> |
|
169 |
|
170 //! @file |
|
171 //! @SYMTestCaseID UCTSSEC-CT-WModeUCTAddCCancelWN1.2 |
|
172 //! @SYMTestCaseDesc The test is to test cancellation of WTLS CA certificate addition with notification. |
|
173 //! @SYMPREQ 226 |
|
174 //! @SYMTestCasePriority High |
|
175 //! @SYMTestExpectedResults KErrNone |
|
176 <action> |
|
177 <actionname>1.2, Cancel WTLS CA certificate CAW1 addition with notification</actionname> |
|
178 <actiontype>addcert</actiontype> |
|
179 <actionbody> |
|
180 <format>WTLS</format> |
|
181 <label>CAW1</label> |
|
182 <issuerkey></issuerkey> |
|
183 <subjectkey></subjectkey> |
|
184 <certstore>0</certstore> |
|
185 <certfile>c:\unifiedcertstore2\CAW1.cer</certfile> |
|
186 <certowner>CA</certowner> |
|
187 <ChangeNotification>1</ChangeNotification> |
|
188 </actionbody> |
|
189 <actionresult> |
|
190 <return>KErrNone</return> |
|
191 </actionresult> |
|
192 </action> |
|
193 |
|
194 //! @file |
|
195 //! @SYMTestCaseID UCTSSEC-CT-WModeUCTAddCCancelWN1.3 |
|
196 //! @SYMTestCaseDesc The test is to test cancellation of X509 user certificate addition with notification. |
|
197 //! @SYMPREQ 226 |
|
198 //! @SYMTestCasePriority High |
|
199 //! @SYMTestExpectedResults KErrNone |
|
200 <action> |
|
201 <actionname>1.3, Cancel X509 user certificate rsacert1 addition with notification</actionname> |
|
202 <actiontype>addcert</actiontype> |
|
203 <actionbody> |
|
204 <format>X509</format> |
|
205 <label>rsacert1</label> |
|
206 <issuerkey></issuerkey> |
|
207 <subjectkey>4808f03892fe836e78d048bcefcca4a37913d886</subjectkey> |
|
208 <certstore>0</certstore> |
|
209 <certfile>c:\unifiedcertstore2\rsacert1.cer</certfile> |
|
210 <certowner>User</certowner> |
|
211 <ChangeNotification>1</ChangeNotification> |
|
212 </actionbody> |
|
213 <actionresult> |
|
214 <return>KErrNone</return> |
|
215 </actionresult> |
|
216 </action> |
|
217 |
|
218 // List certs ////////////////////////////////////////////////////////////////// |
|
219 |
|
220 <action> |
|
221 <actionname>List CA certificates</actionname> |
|
222 <actiontype>listcert</actiontype> |
|
223 <actionbody> |
|
224 <filter> |
|
225 <ownertype>ca</ownertype> |
|
226 </filter> |
|
227 </actionbody> |
|
228 <actionresult> |
|
229 <return>KErrNone</return> |
|
230 <CCTCertInfo><label>CAX1</label></CCTCertInfo> |
|
231 <CCTCertInfo><label>CAW1</label></CCTCertInfo> |
|
232 </actionresult> |
|
233 </action> |
|
234 |
|
235 <action> |
|
236 <actionname>List user certificates</actionname> |
|
237 <actiontype>listcert</actiontype> |
|
238 <actionbody> |
|
239 <filter> |
|
240 <ownertype>user</ownertype> |
|
241 <keyusagedescription> |
|
242 <keyusagescheme>pkcs15</keyusagescheme> |
|
243 <keytype>private</keytype> |
|
244 <keyusage>AllUsagesButNR</keyusage> |
|
245 </keyusagedescription> |
|
246 </filter> |
|
247 </actionbody> |
|
248 <actionresult> |
|
249 <return>KErrNone</return> |
|
250 <CCTCertInfo><label>rsacert1</label></CCTCertInfo> |
|
251 </actionresult> |
|
252 </action> |
|
253 |
|
254 <action> |
|
255 <actionname>List user certificates filtered by key usage</actionname> |
|
256 <actiontype>listcert</actiontype> |
|
257 <actionbody> |
|
258 <filter> |
|
259 <ownertype>user</ownertype> |
|
260 <keyusagedescription> |
|
261 <keyusagescheme>pkcs15</keyusagescheme> |
|
262 <keytype>private</keytype> |
|
263 <keyusage>Decrypt</keyusage> |
|
264 </keyusagedescription> |
|
265 </filter> |
|
266 </actionbody> |
|
267 <actionresult> |
|
268 <return>KErrNone</return> |
|
269 <CCTCertInfo><label>rsacert1</label></CCTCertInfo> |
|
270 </actionresult> |
|
271 </action> |
|
272 |
|
273 <action> |
|
274 <actionname>List user certificates filtered by key usage</actionname> |
|
275 <actiontype>listcert</actiontype> |
|
276 <actionbody> |
|
277 <filter> |
|
278 <ownertype>user</ownertype> |
|
279 <keyusagedescription> |
|
280 <keyusagescheme>pkcs15</keyusagescheme> |
|
281 <keyusage>NonRepudiation</keyusage> |
|
282 <keyusagedescription> |
|
283 </filter> |
|
284 </actionbody> |
|
285 <actionresult> |
|
286 <return>KErrNone</return> |
|
287 </actionresult> |
|
288 </action> |
|
289 |
|
290 <action> |
|
291 <actionname>List certificates filtered by Issuer DN</actionname> |
|
292 <actiontype>listcert</actiontype> |
|
293 <actionbody> |
|
294 <filter> |
|
295 <ownertype>ca</ownertype> |
|
296 </filter> |
|
297 <issuerdn>c:\unifiedcertstore2\CAX1.cer</issuerdn> |
|
298 </actionbody> |
|
299 <actionresult> |
|
300 <return>KErrNone</return> |
|
301 <CCTCertInfo><label>CAX1</label></CCTCertInfo> |
|
302 </actionresult> |
|
303 </action> |
|
304 |
|
305 <action> |
|
306 <actionname>List certificates filtered by Issuer DN</actionname> |
|
307 <actiontype>listcert</actiontype> |
|
308 <actionbody> |
|
309 <filter> |
|
310 <ownertype>ca</ownertype> |
|
311 </filter> |
|
312 <issuerdn>c:\unifiedcertstore2\CAX1.cer</issuerdn> |
|
313 <issuerdn>c:\unifiedcertstore2\CAX2.cer</issuerdn> |
|
314 </actionbody> |
|
315 <actionresult> |
|
316 <return>KErrNone</return> |
|
317 <CCTCertInfo><label>CAX1</label></CCTCertInfo> |
|
318 </actionresult> |
|
319 </action> |
|
320 |
|
321 <action> |
|
322 <actionname>List certificates filtered by Issuer DN</actionname> |
|
323 <actiontype>listcacert</actiontype> |
|
324 <actionbody> |
|
325 <uid></uid> |
|
326 <formatflags></formatflags> |
|
327 <issuerdn>c:\unifiedcertstore2\CAX2.cer</issuerdn> |
|
328 </actionbody> |
|
329 <actionresult> |
|
330 <return>KErrNone</return> |
|
331 </actionresult> |
|
332 </action> |
|
333 |
|
334 // Retrieve certs |
|
335 |
|
336 <action> |
|
337 <actionname>Retrieve CAX1 cert</actionname> |
|
338 <actiontype>retrieve</actiontype> |
|
339 <actionbody> |
|
340 <label>CAX1</label> |
|
341 </actionbody> |
|
342 <actionresult> |
|
343 <return>KErrNone</return> |
|
344 </actionresult> |
|
345 </action> |
|
346 |
|
347 <action> |
|
348 <actionname>Retrieve CAW1 cert</actionname> |
|
349 <actiontype>retrieve</actiontype> |
|
350 <actionbody> |
|
351 <label>CAW1</label> |
|
352 </actionbody> |
|
353 <actionresult> |
|
354 <return>KErrNone</return> |
|
355 </actionresult> |
|
356 </action> |
|
357 |
|
358 // Applications and trust ////////////////////////////////////////////////////// |
|
359 |
|
360 //! @file |
|
361 //! @SYMTestCaseID UCTSSEC-CT-WModeUCTSAppCCancelWN4.1 |
|
362 //! @SYMTestCaseDesc The test is to test cancellation of setting X509 CA certificate application with notification. |
|
363 //! @SYMPREQ 226 |
|
364 //! @SYMTestCasePriority High |
|
365 //! @SYMTestExpectedResults KErrNone |
|
366 <action> |
|
367 <actionname>4.1 Cancel applications setting to the CAX1 certificate with notification</actionname> |
|
368 <actiontype>setapplications</actiontype> |
|
369 <actionbody> |
|
370 <label>CAX1</label> |
|
371 <uid>1 2 3</uid> |
|
372 <ChangeNotification>1</ChangeNotification> |
|
373 </actionbody> |
|
374 <actionresult> |
|
375 <return>KErrNone</return> |
|
376 </actionresult> |
|
377 </action> |
|
378 |
|
379 <action> |
|
380 <actionname>Get applications for CAX1</actionname> |
|
381 <actiontype>getapplications</actiontype> |
|
382 <actionbody> |
|
383 <label>CAX1</label> |
|
384 </actionbody> |
|
385 <actionresult> |
|
386 <return>KErrNone</return> |
|
387 <uid>1 2 3</uid> |
|
388 </actionresult> |
|
389 </action> |
|
390 |
|
391 //! @file |
|
392 //! @SYMTestCaseID UCTSSEC-CT-WModeUCTSTrustCCancelWN3.1 |
|
393 //! @SYMTestCaseDesc The test is to test cancellation of setting X509 CA certificates trust with notification. |
|
394 //! @SYMPREQ 226 |
|
395 //! @SYMTestCasePriority High |
|
396 //! @SYMTestExpectedResults KErrNone |
|
397 <action> |
|
398 <actionname>3.1, Cancel the trust setting for CAX1 with notification</actionname> |
|
399 <actiontype>settrust</actiontype> |
|
400 <actionbody> |
|
401 <label>CAX1</label> |
|
402 <trust>1</trust> |
|
403 <ChangeNotification>1</ChangeNotification> |
|
404 </actionbody> |
|
405 <actionresult> |
|
406 <return>KErrNone</return> |
|
407 </actionresult> |
|
408 </action> |
|
409 |
|
410 <action> |
|
411 <actionname>Get the trust for CAX1</actionname> |
|
412 <actiontype>gettrusters</actiontype> |
|
413 <actionbody> |
|
414 <label>CAX1</label> |
|
415 </actionbody> |
|
416 <actionresult> |
|
417 <return>KErrNone</return> |
|
418 <trust>1</trust> |
|
419 </actionresult> |
|
420 </action> |
|
421 |
|
422 // Delete certs //////////////////////////////////////////////////////////////// |
|
423 //! @file |
|
424 //! @SYMTestCaseID UCTSSEC-CT-WModeUCTDelCCancelWN2.1 |
|
425 //! @SYMTestCaseDesc The test is to test cancellation of X509 CA certificates deletion with notification. |
|
426 //! @SYMPREQ 226 |
|
427 //! @SYMTestCasePriority High |
|
428 //! @SYMTestExpectedResults KErrNone |
|
429 <action> |
|
430 <actionname>2.1, Cancel CAX1 certs deletion with notification</actionname> |
|
431 <actiontype>deletecert</actiontype> |
|
432 <actionbody> |
|
433 <certtype>ca</certtype> |
|
434 <label>CAX1</label> |
|
435 <ChangeNotification>1</ChangeNotification> |
|
436 </actionbody> |
|
437 <actionresult> |
|
438 <return>KErrNone</return> |
|
439 </actionresult> |
|
440 </action> |
|
441 |
|
442 // Cleanup ///////////////////////////////////////////////////////////////////// |
|
443 |
|
444 <action> |
|
445 <actionname>Disabling cancellation testing</actionname> |
|
446 <actiontype>stopcancellation</actiontype> |
|
447 <actionresult> |
|
448 <return>KErrNone</return> |
|
449 </actionresult> |
|
450 </action> |
|
451 |
|
452 <action> |
|
453 <actionname>Deleting all certs</actionname> |
|
454 <actiontype>deletecert</actiontype> |
|
455 <actionbody> |
|
456 <label>*.*</label> |
|
457 <deleteallcerts>1</deleteallcerts> |
|
458 </actionbody> |
|
459 <actionresult> |
|
460 <return>KErrNone</return> |
|
461 </actionresult> |
|
462 </action> |
|
463 |
|
464 <action> |
|
465 <actionname>Deleting the writable certificate store manager</actionname> |
|
466 <actiontype>delete</actiontype> |
|
467 <actionbody></actionbody> |
|
468 <actionresult> |
|
469 <return>KErrNone</return> |
|
470 </actionresult> |
|
471 </action> |
|
472 |
|
473 <action> |
|
474 <actionname>No Test,Opening a CertificateAppInfoManager</actionname> |
|
475 <actiontype>initappmanager</actiontype> |
|
476 <actionbody></actionbody> |
|
477 <actionresult> |
|
478 <return>KErrNone</return> |
|
479 </actionresult> |
|
480 </action> |
|
481 |
|
482 <action> |
|
483 <actionname>No Test,Deleting the client A1</actionname> |
|
484 <actiontype>removeclient</actiontype> |
|
485 <actionbody> |
|
486 <uid>1</uid> |
|
487 </actionbody> |
|
488 <actionresult> |
|
489 <return>KErrNone</return> |
|
490 </actionresult> |
|
491 </action> |
|
492 |
|
493 <action> |
|
494 <actionname>No Test,Deleting the client A2</actionname> |
|
495 <actiontype>removeclient</actiontype> |
|
496 <actionbody> |
|
497 <uid>2</uid> |
|
498 </actionbody> |
|
499 <actionresult> |
|
500 <return>KErrNone</return> |
|
501 </actionresult> |
|
502 </action> |
|
503 |
|
504 <action> |
|
505 <actionname>No Test,Deleting the client A3</actionname> |
|
506 <actiontype>removeclient</actiontype> |
|
507 <actionbody> |
|
508 <uid>3</uid> |
|
509 </actionbody> |
|
510 <actionresult> |
|
511 <return>KErrNone</return> |
|
512 </actionresult> |
|
513 </action> |
|
514 |
|
515 <action> |
|
516 <actionname>No Test,Deleting the client A4</actionname> |
|
517 <actiontype>removeclient</actiontype> |
|
518 <actionbody> |
|
519 <uid>4</uid> |
|
520 </actionbody> |
|
521 <actionresult> |
|
522 <return>KErrNone</return> |
|
523 </actionresult> |
|
524 </action> |
|
525 |
|
526 <action> |
|
527 <actionname>No Test,Deleting the CertificateAppInfoManager</actionname> |
|
528 <actiontype>deleteappmanager</actiontype> |
|
529 <actionbody></actionbody> |
|
530 <actionresult> |
|
531 <return>KErrNone</return> |
|
532 </actionresult> |
|
533 </action> |