cryptoservices/certificateandkeymgmt/tcertstore/scripts/apipolicing.txt
changeset 0 2c201484c85f
equal deleted inserted replaced
-1:000000000000 0:2c201484c85f
       
     1 // apipolicing.txt
       
     2 //
       
     3 // Test cert store API policing of filetokens cert store
       
     4 //
       
     5 // This test should be run in configuration 1, with only the file cert store
       
     6 // present
       
     7 
       
     8 // Test add CA
       
     9 // Test set app, set trust
       
    10 // Test not protected list, get, get apps, get trust, retrieve
       
    11 // Test remove CA
       
    12 // Test add user
       
    13 // Test not protected list, get
       
    14 // Test retrieve
       
    15 // Test remove user
       
    16 // Test add peer
       
    17 // Test retrieve
       
    18 // Test remove peer
       
    19 
       
    20 // 0. Setup
       
    21 
       
    22 //! @file
       
    23 //! @SYMTestCaseID Sec-tcertstore-apipolicing-0.1.1
       
    24 //! @SYMTestCaseDesc Opening a CertificateAppInfoManager
       
    25 //! @SYMREQ REQ3466
       
    26 //! @SYMTestCasePriority High
       
    27 //! @SYMTestExpectedResults KErrNone
       
    28 <action>
       
    29 	<actionname>0.1.1, Opening a CertificateAppInfoManager</actionname>
       
    30 	<actiontype>initappmanager</actiontype>
       
    31 	<actionbody></actionbody>
       
    32 	<actionresult>
       
    33 		<return>KErrNone</return>
       
    34 	</actionresult>
       
    35 </action>
       
    36 
       
    37 //! @file
       
    38 //! @SYMTestCaseID Sec-tcertstore-apipolicing-0.1.2
       
    39 //! @SYMTestCaseDesc Adding client A1
       
    40 //! @SYMREQ REQ3466
       
    41 //! @SYMTestCasePriority High
       
    42 //! @SYMTestExpectedResults KErrNone
       
    43 <action>
       
    44 	<actionname>0.1.2, Adding client A1</actionname>
       
    45 	<actiontype>addclient</actiontype>
       
    46 	<actionbody>
       
    47 		<name>A1</name>
       
    48 		<uid>1</uid>
       
    49 	</actionbody>
       
    50 	<actionresult>
       
    51 		<return>KErrNone</return>
       
    52 	</actionresult>
       
    53 </action>
       
    54 
       
    55 //! @file
       
    56 //! @SYMTestCaseID Sec-tcertstore-apipolicing-0.1.3
       
    57 //! @SYMTestCaseDesc Adding client A2
       
    58 //! @SYMREQ REQ3466
       
    59 //! @SYMTestCasePriority High
       
    60 //! @SYMTestExpectedResults KErrNone
       
    61 <action>
       
    62 	<actionname>0.1.3, Adding client A2</actionname>
       
    63 	<actiontype>addclient</actiontype>
       
    64 	<actionbody>
       
    65 		<name>A2</name>
       
    66 		<uid>2</uid>
       
    67 	</actionbody>
       
    68 	<actionresult>
       
    69 		<return>KErrNone</return>
       
    70 	</actionresult>
       
    71 </action>
       
    72 
       
    73 //! @file
       
    74 //! @SYMTestCaseID Sec-tcertstore-apipolicing-0.1.4
       
    75 //! @SYMTestCaseDesc Adding client A3
       
    76 //! @SYMREQ REQ3466
       
    77 //! @SYMTestCasePriority High
       
    78 //! @SYMTestExpectedResults KErrNone
       
    79 <action>
       
    80 	<actionname>0.1.4, Adding client A3</actionname>
       
    81 	<actiontype>addclient</actiontype>
       
    82 	<actionbody>
       
    83 		<name>A3</name>
       
    84 		<uid>3</uid>
       
    85 	</actionbody>
       
    86 	<actionresult>
       
    87 		<return>KErrNone</return>
       
    88 	</actionresult>
       
    89 </action>
       
    90 
       
    91 //! @file
       
    92 //! @SYMTestCaseID Sec-tcertstore-apipolicing-0.1.5
       
    93 //! @SYMTestCaseDesc Adding client A4
       
    94 //! @SYMREQ REQ3466
       
    95 //! @SYMTestCasePriority High
       
    96 //! @SYMTestExpectedResults KErrNone
       
    97 <action>
       
    98 	<actionname>0.1.5, Adding client A4</actionname>
       
    99 	<actiontype>addclient</actiontype>
       
   100 	<actionbody>
       
   101 		<name>A4</name>
       
   102 		<uid>4</uid>
       
   103 	</actionbody>
       
   104 	<actionresult>
       
   105 		<return>KErrNone</return>
       
   106 	</actionresult>
       
   107 </action>
       
   108 
       
   109 //! @file
       
   110 //! @SYMTestCaseID Sec-tcertstore-apipolicing-0.1.6
       
   111 //! @SYMTestCaseDesc Deleting the CertificateAppInfoManager
       
   112 //! @SYMREQ REQ3466
       
   113 //! @SYMTestCasePriority High
       
   114 //! @SYMTestExpectedResults KErrNone
       
   115 <action>
       
   116 	<actionname>0.1.6, Deleting the CertificateAppInfoManager</actionname>
       
   117 	<actiontype>deleteappmanager</actiontype>
       
   118 	<actionbody></actionbody>
       
   119 	<actionresult>
       
   120 		<return>KErrNone</return>
       
   121 	</actionresult>
       
   122 </action>
       
   123 
       
   124 //! @file
       
   125 //! @SYMTestCaseID Sec-tcertstore-apipolicing-0.2
       
   126 //! @SYMTestCaseDesc Opening a writable certificate store manager
       
   127 //! @SYMREQ REQ3466
       
   128 //! @SYMTestCasePriority High
       
   129 //! @SYMTestExpectedResults KErrNone
       
   130 <action>
       
   131 	<actionname>0.2, Opening a writable certificate store manager</actionname>
       
   132 	<actiontype>init</actiontype>
       
   133 	<actionbody>
       
   134 		<mode>write</mode>
       
   135 	</actionbody>
       
   136 	<actionresult>
       
   137 		<return>KErrNone</return>
       
   138 	</actionresult>
       
   139 </action>
       
   140 
       
   141 //! @file
       
   142 //! @SYMTestCaseID Sec-tcertstore-apipolicing-0.3.1
       
   143 //! @SYMTestCaseDesc Retrieving number of writable certificate store manager
       
   144 //! @SYMREQ REQ3466
       
   145 //! @SYMTestCasePriority High
       
   146 //! @SYMTestExpectedResults KErrNone
       
   147 <action>
       
   148 	<actionname>0.3.1, Retrieving number of writable certificate store manager</actionname>
       
   149 	<actiontype>CUnifiedCertStore WritableCertStoreCount</actiontype>
       
   150 	<actionbody>
       
   151 		<storeindex>0</storeindex>
       
   152 	</actionbody>
       
   153 	<actionresult>
       
   154 		<return>KErrNone</return>
       
   155 		<numberofstores>1</numberofstores>
       
   156 	</actionresult>
       
   157 </action>
       
   158 
       
   159 //! @file
       
   160 //! @SYMTestCaseID Sec-tcertstore-apipolicing-0.3.2
       
   161 //! @SYMTestCaseDesc Retrieving number of read-only certificate store manager
       
   162 //! @SYMREQ REQ3466
       
   163 //! @SYMTestCasePriority High
       
   164 //! @SYMTestExpectedResults KErrNone
       
   165 <action>
       
   166 	<actionname>0.3.2, Retrieving number of read-only certificate store manager</actionname>
       
   167 	<actiontype>CUnifiedCertStore ReadOnlyCertStoreCount</actiontype>
       
   168 	<actionbody>
       
   169 		<storeindex>0</storeindex>
       
   170 	</actionbody>
       
   171 	<actionresult>
       
   172 		<return>KErrNone</return>
       
   173 		<numberofstores>0</numberofstores>
       
   174 	</actionresult>
       
   175 </action>
       
   176 
       
   177 //! @file
       
   178 //! @SYMTestCaseID Sec-tcertstore-apipolicing-0.3.3
       
   179 //! @SYMTestCaseDesc Retrieving number of certificate store manager
       
   180 //! @SYMREQ REQ3466
       
   181 //! @SYMTestCasePriority High
       
   182 //! @SYMTestExpectedResults KErrNone
       
   183 <action>
       
   184 	<actionname>0.3.3, Retrieving number of certificate store manager</actionname>
       
   185 	<actiontype>CUnifiedCertStore CertStoreCount</actiontype>
       
   186 	<actionbody>
       
   187 		<storeindex>0</storeindex>
       
   188 	</actionbody>
       
   189 	<actionresult>
       
   190 		<return>KErrNone</return>
       
   191 		<numberofstores>1</numberofstores>
       
   192 	</actionresult>
       
   193 </action>
       
   194 
       
   195 //! @file
       
   196 //! @SYMTestCaseID Sec-tcertstore-apipolicing-0.4
       
   197 //! @SYMTestCaseDesc Delete all certs
       
   198 //! @SYMREQ REQ3466
       
   199 //! @SYMTestCasePriority High
       
   200 //! @SYMTestExpectedResults KErrNone
       
   201 <action>
       
   202 	<actionname>0.4, Delete all certs</actionname>
       
   203 	<actiontype>deletecert</actiontype>
       
   204 	<actionbody>
       
   205 		<label>*.*</label>
       
   206 		<deleteallcerts>1</deleteallcerts>
       
   207 	</actionbody>
       
   208 	<actionresult>
       
   209 		<return>KErrNone</return>
       
   210 	</actionresult>
       
   211 </action>
       
   212 
       
   213 //! @file
       
   214 //! @SYMTestCaseID Sec-tcertstore-apipolicing-0.5
       
   215 //! @SYMTestCaseDesc Import a RSA key rsacertkey1
       
   216 //! @SYMREQ REQ3466
       
   217 //! @SYMTestCasePriority High
       
   218 //! @SYMTestExpectedResults KErrNone
       
   219 <action>
       
   220 	<actionname>0.5, Import a RSA key rsacertkey1</actionname>
       
   221 	<actiontype>importkey</actiontype>
       
   222 	<actionbody>
       
   223 		<ImportData>rsacertkey1.txt</ImportData>
       
   224 		<keyusage>AllUsagesButNR</keyusage>
       
   225 		<keylabel>*IMPORTED* RSA key 1</keylabel>
       
   226 		<keyaccesstype>Extractable</keyaccesstype>
       
   227 	</actionbody>
       
   228 	<actionresult>
       
   229 		<return>KErrNone</return>
       
   230 	</actionresult>
       
   231 </action>
       
   232 
       
   233 // 1. Test CA certificates
       
   234 
       
   235 //! @file
       
   236 //! @SYMTestCaseID Sec-tcertstore-apipolicing-1.1
       
   237 //! @SYMTestCaseDesc Test add CA certificate protected by WriteDeviceData
       
   238 //! @SYMREQ REQ3466
       
   239 //! @SYMTestCasePriority High
       
   240 //! @SYMTestExpectedResults KErrNone
       
   241 <action>
       
   242 	<actionname>1.1, Test add CA certificate protected by WriteDeviceData</actionname>
       
   243 	<actiontype>policytest</actiontype>
       
   244 	<actionbody>
       
   245 		<testexe>t_certstore.exe</testexe>
       
   246 		<excludedcapabilities>
       
   247 			<capability>TCB</capability>
       
   248 		</excludedcapabilities>
       
   249 		<policy>
       
   250 			<capability>WriteDeviceData</capability>
       
   251 		</policy>
       
   252 
       
   253 		<preactions>
       
   254 			<action>
       
   255 				<actionname>Opening a writable certificate store manager</actionname>
       
   256 				<actiontype>init</actiontype>
       
   257 				<actionbody>
       
   258 					<mode>write</mode>
       
   259 				</actionbody>
       
   260 				<actionresult>
       
   261 					<return>KErrNone</return>
       
   262 				</actionresult>
       
   263 			</action>
       
   264 		</preactions>
       
   265 
       
   266 		<passactions>
       
   267 			<action>
       
   268 				<actionname>Add the certificate CAX1</actionname>
       
   269 				<actiontype>addcert</actiontype>
       
   270 				<actionbody>
       
   271 					<format>X509</format>
       
   272 					<label>CAX1</label>
       
   273 					<issuerkey></issuerkey>
       
   274 					<subjectkey></subjectkey>
       
   275 					<certstore>0</certstore>
       
   276 					<certfile>c:\unifiedcertstore2\CAX1.cer</certfile>
       
   277 					<certowner>ca</certowner>
       
   278 				</actionbody>
       
   279 				<actionresult>
       
   280 					<return>KErrNone</return>
       
   281 				</actionresult>
       
   282 			</action>
       
   283 
       
   284 			<action>
       
   285 				<actionname>Get the list of certificates</actionname>
       
   286 				<actiontype>listcert</actiontype>
       
   287 				<actionbody>
       
   288 					<filter>
       
   289 					<ownertype>ca</ownertype>
       
   290 					</filter>
       
   291 				</actionbody>
       
   292 				<actionresult>
       
   293 					<return>KErrNone</return>
       
   294 					<CCTCertInfo><label>CAX1</label></CCTCertInfo>
       
   295 				</actionresult>
       
   296 			</action>
       
   297 		</passactions>
       
   298 
       
   299 		<failactions>
       
   300 			<action>
       
   301 				<actionname>Add the certificate CAX1</actionname>
       
   302 				<actiontype>addcert</actiontype>
       
   303 				<actionbody>
       
   304 					<format>X509</format>
       
   305 					<label>CAX1</label>
       
   306 					<issuerkey></issuerkey>
       
   307 					<subjectkey></subjectkey>
       
   308 					<certstore>0</certstore>
       
   309 					<certfile>c:\unifiedcertstore2\CAX1.cer</certfile>
       
   310 					<certowner>ca</certowner>
       
   311 				</actionbody>
       
   312 				<actionresult>
       
   313 					<return>KErrPermissionDenied</return>
       
   314 				</actionresult>
       
   315 			</action>
       
   316 
       
   317 			<action>
       
   318 				<actionname>Get the list of certificates</actionname>
       
   319 				<actiontype>listcert</actiontype>
       
   320 				<actionbody>
       
   321 					<filter>
       
   322 					<ownertype>ca</ownertype>
       
   323 					</filter>
       
   324 				</actionbody>
       
   325 				<actionresult>
       
   326 					<return>KErrNone</return>
       
   327 				</actionresult>
       
   328 			</action>
       
   329 		</failactions>
       
   330 
       
   331 		<postactions>
       
   332 			<action>
       
   333 				<actionname>Deleting the writable certificate store manager</actionname>
       
   334 				<actiontype>delete</actiontype>
       
   335 				<actionbody></actionbody>
       
   336 				<actionresult>
       
   337 					<return>KErrNone</return>
       
   338 				</actionresult>
       
   339 			</action>
       
   340 		</postactions>
       
   341 	</actionbody>
       
   342 	<actionresult>
       
   343 		<return>KErrNone</return>
       
   344 	</actionresult>
       
   345 </action>
       
   346 
       
   347 //! @file
       
   348 //! @SYMTestCaseID Sec-tcertstore-apipolicing-1.2
       
   349 //! @SYMTestCaseDesc Test set apps and trust for protected by WriteDeviceData
       
   350 //! @SYMREQ REQ3466
       
   351 //! @SYMTestCasePriority High
       
   352 //! @SYMTestExpectedResults KErrNone
       
   353 <action>
       
   354 	<actionname>1.2, Test set apps and trust for protected by WriteDeviceData</actionname>
       
   355 	<actiontype>policytest</actiontype>
       
   356 	<actionbody>
       
   357 		<testexe>t_certstore.exe</testexe>
       
   358 		<excludedcapabilities>
       
   359 			<capability>TCB</capability>
       
   360 		</excludedcapabilities>
       
   361 		<policy>
       
   362 			<capability>WriteDeviceData</capability>
       
   363 		</policy>
       
   364 
       
   365 		<preactions>
       
   366 			<action>
       
   367 				<actionname>Opening a writable certificate store manager</actionname>
       
   368 				<actiontype>init</actiontype>
       
   369 				<actionbody>
       
   370 					<mode>write</mode>
       
   371 				</actionbody>
       
   372 				<actionresult>
       
   373 					<return>KErrNone</return>
       
   374 				</actionresult>
       
   375 			</action>
       
   376 		</preactions>
       
   377 
       
   378 		<passactions>
       
   379 			<action>
       
   380 				<actionname>Set applications to the CAX1 certificate</actionname>
       
   381 				<actiontype>setapplications</actiontype>
       
   382 				<actionbody>
       
   383 					<label>CAX1</label>
       
   384 					<uid>2 3</uid>
       
   385 				</actionbody>
       
   386 				<actionresult>
       
   387 					<return>KErrNone</return>
       
   388 				</actionresult>
       
   389 			</action>
       
   390 
       
   391 			<action>
       
   392 				<actionname>Set the trust for CAX1</actionname>
       
   393 				<actiontype>settrust</actiontype> 
       
   394 				<actionbody>
       
   395 					<label>CAX1</label>
       
   396 					<trust>1</trust>
       
   397 				</actionbody>
       
   398 				<actionresult>
       
   399 					<return>KErrNone</return>
       
   400 				</actionresult>
       
   401 			</action>
       
   402 
       
   403 			<action>
       
   404 				<actionname>Get applications for CAX1</actionname>
       
   405 				<actiontype>getapplications</actiontype>
       
   406 				<actionbody>
       
   407 					<label>CAX1</label>
       
   408 				</actionbody>
       
   409 				<actionresult>
       
   410 					<return>KErrNone</return>
       
   411 					<uid>2 3</uid>
       
   412 				</actionresult>
       
   413 			</action>
       
   414 
       
   415 			<action>
       
   416 				<actionname>Get the trust for CAX1</actionname>
       
   417 				<actiontype>gettrusters</actiontype>
       
   418 				<actionbody>
       
   419 					<label>CAX1</label>
       
   420 				</actionbody>
       
   421 				<actionresult>
       
   422 					<return>KErrNone</return>
       
   423 					<trust>1</trust>
       
   424 				</actionresult>
       
   425 			</action>
       
   426 		</passactions>
       
   427 
       
   428 		<failactions>
       
   429 			<action>
       
   430 				<actionname>Set applications to the CAX1 certificate</actionname>
       
   431 				<actiontype>setapplications</actiontype>
       
   432 				<actionbody>
       
   433 					<label>CAX1</label>
       
   434 					<uid>2 3</uid>
       
   435 				</actionbody>
       
   436 				<actionresult>
       
   437 					<return>KErrPermissionDenied</return>
       
   438 				</actionresult>
       
   439 			</action>
       
   440 
       
   441 			<action>
       
   442 				<actionname>Set the trust for CAX1</actionname>
       
   443 				<actiontype>settrust</actiontype> 
       
   444 				<actionbody>
       
   445 					<label>CAX1</label>
       
   446 					<trust>1</trust>
       
   447 				</actionbody>
       
   448 				<actionresult>
       
   449 					<return>KErrPermissionDenied</return>
       
   450 				</actionresult>
       
   451 			</action>
       
   452 
       
   453 			<action>
       
   454 				<actionname>Get applications for CAX1</actionname>
       
   455 				<actiontype>getapplications</actiontype>
       
   456 				<actionbody>
       
   457 					<label>CAX1</label>
       
   458 				</actionbody>
       
   459 				<actionresult>
       
   460 					<return>KErrNone</return>
       
   461 					<uid></uid>
       
   462 				</actionresult>
       
   463 			</action>
       
   464 
       
   465 			<action>
       
   466 				<actionname>Get the trust for CAX1</actionname>
       
   467 				<actiontype>gettrusters</actiontype>
       
   468 				<actionbody>
       
   469 					<label>CAX1</label>
       
   470 				</actionbody>
       
   471 				<actionresult>
       
   472 					<return>KErrNone</return>
       
   473 					<trust>0</trust>
       
   474 				</actionresult>
       
   475 			</action>
       
   476 		</failactions>
       
   477 
       
   478 		<postactions>
       
   479 			<action>
       
   480 				<actionname>Deleting the writable certificate store manager</actionname>
       
   481 				<actiontype>delete</actiontype>
       
   482 				<actionbody></actionbody>
       
   483 				<actionresult>
       
   484 					<return>KErrNone</return>
       
   485 				</actionresult>
       
   486 			</action>
       
   487 		</postactions>
       
   488 	</actionbody>
       
   489 	<actionresult>
       
   490 		<return>KErrNone</return>
       
   491 	</actionresult>
       
   492 </action>
       
   493 
       
   494 //! @file
       
   495 //! @SYMTestCaseID Sec-tcertstore-apipolicing-1.3
       
   496 //! @SYMTestCaseDesc Test list, retrieve get apps and get trust not protected by any capability for CA certs
       
   497 //! @SYMREQ REQ3466
       
   498 //! @SYMTestCasePriority High
       
   499 //! @SYMTestExpectedResults KErrNone
       
   500 <action>
       
   501 	<actionname>1.3, Test list, retrieve get apps and get trust not protected by any capability for CA certs</actionname>
       
   502 	<actiontype>policytest</actiontype>
       
   503 	<actionbody>
       
   504 		<testexe>t_certstore.exe</testexe>
       
   505 		<excludedcapabilities>
       
   506 			<capability>TCB</capability>
       
   507 		</excludedcapabilities>
       
   508 		<policy>
       
   509 		</policy>
       
   510 
       
   511 		<preactions>
       
   512 			<action>
       
   513 				<actionname>Opening a writable certificate store manager</actionname>
       
   514 				<actiontype>init</actiontype>
       
   515 				<actionbody>
       
   516 					<mode>write</mode>
       
   517 				</actionbody>
       
   518 				<actionresult>
       
   519 					<return>KErrNone</return>
       
   520 				</actionresult>
       
   521 			</action>
       
   522 		</preactions>
       
   523 
       
   524 		<passactions>
       
   525 			<action>
       
   526 				<actionname>Get applications for CAX1</actionname>
       
   527 				<actiontype>getapplications</actiontype>
       
   528 				<actionbody>
       
   529 					<label>CAX1</label>
       
   530 				</actionbody>
       
   531 				<actionresult>
       
   532 					<return>KErrNone</return>
       
   533 					<uid>2 3</uid>
       
   534 				</actionresult>
       
   535 			</action>
       
   536 
       
   537 			<action>
       
   538 				<actionname>Get the trust for CAX1</actionname>
       
   539 				<actiontype>gettrusters</actiontype>
       
   540 				<actionbody>
       
   541 					<label>CAX1</label>
       
   542 				</actionbody>
       
   543 				<actionresult>
       
   544 					<return>KErrNone</return>
       
   545 					<trust>1</trust>
       
   546 				</actionresult>
       
   547 			</action>
       
   548 
       
   549 			<action>
       
   550 				<actionname>Get the list of certificates</actionname>
       
   551 				<actiontype>listcert</actiontype>
       
   552 				<actionbody>
       
   553 					<filter>
       
   554 					<ownertype>ca</ownertype>
       
   555 					</filter>
       
   556 				</actionbody>
       
   557 				<actionresult>
       
   558 					<return>KErrNone</return>
       
   559 					<CCTCertInfo><label>CAX1</label></CCTCertInfo>
       
   560 				</actionresult>
       
   561 			</action>
       
   562 
       
   563 			<action>
       
   564 				<actionname>Retrieve CAX1 cert</actionname>
       
   565 				<actiontype>retrieve</actiontype>
       
   566 				<actionbody>
       
   567 					<label>CAX1</label>
       
   568 				</actionbody>
       
   569 				<actionresult>
       
   570 					<return>KErrNone</return>
       
   571 				</actionresult>
       
   572 			</action>
       
   573 		</passactions>
       
   574 
       
   575 		<failactions>
       
   576 		</failactions>
       
   577 
       
   578 		<postactions>
       
   579 			<action>
       
   580 				<actionname>Deleting the writable certificate store manager</actionname>
       
   581 				<actiontype>delete</actiontype>
       
   582 				<actionbody></actionbody>
       
   583 				<actionresult>
       
   584 					<return>KErrNone</return>
       
   585 				</actionresult>
       
   586 			</action>
       
   587 		</postactions>
       
   588 	</actionbody>
       
   589 	<actionresult>
       
   590 		<return>KErrNone</return>
       
   591 	</actionresult>
       
   592 </action>
       
   593 
       
   594 //! @file
       
   595 //! @SYMTestCaseID Sec-tcertstore-apipolicing-1.4
       
   596 //! @SYMTestCaseDesc Test remove CA certificate protected by WriteDeviceData
       
   597 //! @SYMREQ REQ3466
       
   598 //! @SYMTestCasePriority High
       
   599 //! @SYMTestExpectedResults KErrNone
       
   600 <action>
       
   601 	<actionname>1.4, Test remove CA certificate protected by WriteDeviceData</actionname>
       
   602 	<actiontype>policytest</actiontype>
       
   603 	<actionbody>
       
   604 		<testexe>t_certstore.exe</testexe>
       
   605 		<excludedcapabilities>
       
   606 			<capability>TCB</capability>
       
   607 		</excludedcapabilities>
       
   608 		<policy>
       
   609 			<capability>WriteDeviceData</capability>
       
   610 		</policy>
       
   611 
       
   612 		<preactions>
       
   613 			<action>
       
   614 				<actionname>Opening a writable certificate store manager</actionname>
       
   615 				<actiontype>init</actiontype>
       
   616 				<actionbody>
       
   617 					<mode>write</mode>
       
   618 				</actionbody>
       
   619 				<actionresult>
       
   620 					<return>KErrNone</return>
       
   621 				</actionresult>
       
   622 			</action>
       
   623 		</preactions>
       
   624 
       
   625 		<passactions>
       
   626 			<action>
       
   627 				<actionname>Remove the certificate CAX1</actionname>
       
   628 				<actiontype>deletecert</actiontype>
       
   629 				<actionbody>
       
   630 					<certtype>ca</certtype>
       
   631 					<label>CAX1</label>
       
   632 				</actionbody>
       
   633 				<actionresult>
       
   634 					<return>KErrNone</return>
       
   635 				</actionresult>
       
   636 			</action>
       
   637 
       
   638 			<action>
       
   639 				<actionname>Get the list of certificates</actionname>
       
   640 				<actiontype>listcert</actiontype>
       
   641 				<actionbody>
       
   642 					<filter>
       
   643 					<ownertype>ca</ownertype>
       
   644 					</filter>
       
   645 				</actionbody>
       
   646 				<actionresult>
       
   647 					<return>KErrNone</return>
       
   648 				</actionresult>
       
   649 			</action>
       
   650 		</passactions>
       
   651 
       
   652 		<failactions>
       
   653 			<action>
       
   654 				<actionname>Remove the certificate CAX1</actionname>
       
   655 				<actiontype>deletecert</actiontype>
       
   656 				<actionbody>
       
   657 					<certtype>ca</certtype>
       
   658 					<label>CAX1</label>
       
   659 				</actionbody>
       
   660 				<actionresult>
       
   661 					<return>KErrPermissionDenied</return>
       
   662 				</actionresult>
       
   663 			</action>
       
   664 
       
   665 			<action>
       
   666 				<actionname>Get the list of certificates</actionname>
       
   667 				<actiontype>listcert</actiontype>
       
   668 				<actionbody>
       
   669 					<filter>
       
   670 					<ownertype>ca</ownertype>
       
   671 					</filter>
       
   672 				</actionbody>
       
   673 				<actionresult>
       
   674 					<CCTCertInfo><label>CAX1</label></CCTCertInfo>
       
   675 					<return>KErrNone</return>
       
   676 				</actionresult>
       
   677 			</action>
       
   678 		</failactions>
       
   679 
       
   680 		<postactions>
       
   681 			<action>
       
   682 				<actionname>Deleting the writable certificate store manager</actionname>
       
   683 				<actiontype>delete</actiontype>
       
   684 				<actionbody></actionbody>
       
   685 				<actionresult>
       
   686 					<return>KErrNone</return>
       
   687 				</actionresult>
       
   688 			</action>
       
   689 		</postactions>
       
   690 	</actionbody>
       
   691 	<actionresult>
       
   692 		<return>KErrNone</return>
       
   693 	</actionresult>
       
   694 </action>
       
   695 
       
   696 // 2. Test user certificates
       
   697 
       
   698 //! @file
       
   699 //! @SYMTestCaseID Sec-tcertstore-apipolicing-2.1
       
   700 //! @SYMTestCaseDesc Test add user certificate protected by WriteUserData
       
   701 //! @SYMREQ REQ3466
       
   702 //! @SYMTestCasePriority High
       
   703 //! @SYMTestExpectedResults KErrNone
       
   704 <action>
       
   705 	<actionname>2.1, Test add user certificate protected by WriteUserData</actionname>
       
   706 	<actiontype>policytest</actiontype>
       
   707 	<actionbody>
       
   708 		<testexe>t_certstore.exe</testexe>
       
   709 		<excludedcapabilities>
       
   710 			<capability>TCB</capability>
       
   711 		</excludedcapabilities>
       
   712 		<policy>
       
   713 			<capability>ReadUserData</capability>
       
   714 			<capability>WriteUserData</capability>
       
   715 		</policy>
       
   716 
       
   717 		<preactions>
       
   718 			<action>
       
   719 				<actionname>Opening a writable certificate store manager</actionname>
       
   720 				<actiontype>init</actiontype>
       
   721 				<actionbody>
       
   722 					<mode>write</mode>
       
   723 				</actionbody>
       
   724 				<actionresult>
       
   725 					<return>KErrNone</return>
       
   726 				</actionresult>
       
   727 			</action>
       
   728 		</preactions>
       
   729 		
       
   730 		<failactions>
       
   731 			<action>
       
   732 				<actionname>Add the certificate rsacert1</actionname>
       
   733 				<actiontype>addcert</actiontype>
       
   734 				<actionbody>
       
   735 					<format>X509</format>
       
   736 					<label>rsacert1</label>
       
   737 					<issuerkey></issuerkey>
       
   738 					<subjectkey>4808f03892fe836e78d048bcefcca4a37913d886</subjectkey>
       
   739 					<certstore>0</certstore>
       
   740 					<certfile>c:\unifiedcertstore2\rsacert1.cer</certfile>
       
   741 					<certowner>user</certowner>
       
   742 				</actionbody>
       
   743 				<actionresult>
       
   744 					<return>KErrPermissionDenied</return>
       
   745 				</actionresult>
       
   746 			</action>
       
   747 
       
   748 			<action>
       
   749 				<actionname>Get the list of certificates</actionname>
       
   750 				<actiontype>listcert</actiontype>
       
   751 				<actionbody>
       
   752 					<filter>
       
   753 					<ownertype>user</ownertype>
       
   754 					</filter>
       
   755 				</actionbody>
       
   756 				<actionresult>
       
   757 					<return>KErrNone</return>
       
   758 				</actionresult>
       
   759 			</action>
       
   760 		</failactions>
       
   761 
       
   762 		<passactions>
       
   763 			<action>
       
   764 				<actionname>Add the certificate rsacert1</actionname>
       
   765 				<actiontype>addcert</actiontype>
       
   766 				<actionbody>
       
   767 					<format>X509</format>
       
   768 					<label>rsacert1</label>
       
   769 					<issuerkey></issuerkey>
       
   770 					<subjectkey>4808f03892fe836e78d048bcefcca4a37913d886</subjectkey>
       
   771 					<certstore>0</certstore>
       
   772 					<certfile>c:\unifiedcertstore2\rsacert1.cer</certfile>
       
   773 					<certowner>user</certowner>
       
   774 				</actionbody>
       
   775 				<actionresult>
       
   776 					<return>KErrNone</return>
       
   777 				</actionresult>
       
   778 			</action>
       
   779 
       
   780 			<action>
       
   781 				<actionname>Get the list of certificates</actionname>
       
   782 				<actiontype>listcert</actiontype>
       
   783 				<actionbody>
       
   784 					<filter>
       
   785 					<ownertype>user</ownertype>
       
   786 					</filter>
       
   787 				</actionbody>
       
   788 				<actionresult>
       
   789 					<CCTCertInfo><label>rsacert1</label></CCTCertInfo>
       
   790 					<return>KErrNone</return>
       
   791 				</actionresult>
       
   792 			</action>
       
   793 		</passactions>
       
   794 
       
   795 		<postactions>
       
   796 			<action>
       
   797 				<actionname>Deleting the writable certificate store manager</actionname>
       
   798 				<actiontype>delete</actiontype>
       
   799 				<actionbody></actionbody>
       
   800 				<actionresult>
       
   801 					<return>KErrNone</return>
       
   802 				</actionresult>
       
   803 			</action>
       
   804 		</postactions>
       
   805 	</actionbody>
       
   806 	<actionresult>
       
   807 		<return>KErrNone</return>
       
   808 	</actionresult>
       
   809 </action>
       
   810 
       
   811 //! @file
       
   812 //! @SYMTestCaseID Sec-tcertstore-apipolicing-2.2
       
   813 //! @SYMTestCaseDesc Test list not protected by any capability for user certs
       
   814 //! @SYMREQ REQ3466
       
   815 //! @SYMTestCasePriority High
       
   816 //! @SYMTestExpectedResults KErrNone
       
   817 <action>
       
   818 	<actionname>2.2, Test list not protected by any capability for user certs</actionname>
       
   819 	<actiontype>policytest</actiontype>
       
   820 	<actionbody>
       
   821 		<testexe>t_certstore.exe</testexe>
       
   822 		<excludedcapabilities>
       
   823 			<capability>TCB</capability>
       
   824 		</excludedcapabilities>
       
   825 		<policy>
       
   826 		</policy>
       
   827 
       
   828 		<preactions>
       
   829 			<action>
       
   830 				<actionname>Opening a writable certificate store manager</actionname>
       
   831 				<actiontype>init</actiontype>
       
   832 				<actionbody>
       
   833 					<mode>write</mode>
       
   834 				</actionbody>
       
   835 				<actionresult>
       
   836 					<return>KErrNone</return>
       
   837 				</actionresult>
       
   838 			</action>
       
   839 		</preactions>
       
   840 
       
   841 		<passactions>
       
   842 			<action>
       
   843 				<actionname>Get the list of certificates</actionname>
       
   844 				<actiontype>listcert</actiontype>
       
   845 				<actionbody>
       
   846 					<filter>
       
   847 					<ownertype>user</ownertype>
       
   848 					</filter>
       
   849 				</actionbody>
       
   850 				<actionresult>
       
   851 					<return>KErrNone</return>
       
   852 					<CCTCertInfo><label>rsacert1</label></CCTCertInfo>
       
   853 				</actionresult>
       
   854 			</action>
       
   855 		</passactions>
       
   856 
       
   857 		<failactions>
       
   858 		</failactions>
       
   859 
       
   860 		<postactions>
       
   861 			<action>
       
   862 				<actionname>Deleting the writable certificate store manager</actionname>
       
   863 				<actiontype>delete</actiontype>
       
   864 				<actionbody></actionbody>
       
   865 				<actionresult>
       
   866 					<return>KErrNone</return>
       
   867 				</actionresult>
       
   868 			</action>
       
   869 		</postactions>
       
   870 	</actionbody>
       
   871 	<actionresult>
       
   872 		<return>KErrNone</return>
       
   873 	</actionresult>
       
   874 </action>
       
   875 
       
   876 //! @file
       
   877 //! @SYMTestCaseID Sec-tcertstore-apipolicing-2.3
       
   878 //! @SYMTestCaseDesc Test retrieve protected by ReadUserData capability for user certs
       
   879 //! @SYMREQ REQ3466
       
   880 //! @SYMTestCasePriority High
       
   881 //! @SYMTestExpectedResults KErrNone
       
   882 <action>
       
   883 	<actionname>2.3, Test retrieve protected by ReadUserData capability for user certs</actionname>
       
   884 	<actiontype>policytest</actiontype>
       
   885 	<actionbody>
       
   886 		<testexe>t_certstore.exe</testexe>
       
   887 		<excludedcapabilities>
       
   888 			<capability>TCB</capability>
       
   889 		</excludedcapabilities>
       
   890 		<policy>
       
   891 			<capability>ReadUserData</capability>
       
   892 		</policy>
       
   893 
       
   894 		<preactions>
       
   895 			<action>
       
   896 				<actionname>Opening a writable certificate store manager</actionname>
       
   897 				<actiontype>init</actiontype>
       
   898 				<actionbody>
       
   899 					<mode>write</mode>
       
   900 				</actionbody>
       
   901 				<actionresult>
       
   902 					<return>KErrNone</return>
       
   903 				</actionresult>
       
   904 			</action>
       
   905 		</preactions>
       
   906 
       
   907 		<passactions>
       
   908 			<action>
       
   909 				<actionname>Retrieve rsacert1 cert</actionname>
       
   910 				<actiontype>retrieve</actiontype>
       
   911 				<actionbody>
       
   912 					<label>rsacert1</label>
       
   913 				</actionbody>
       
   914 				<actionresult>
       
   915 					<return>KErrNone</return>
       
   916 				</actionresult>
       
   917 			</action>
       
   918 		</passactions>
       
   919 
       
   920 		<failactions>
       
   921 			<action>
       
   922 				<actionname>Retrieve rsacert1 cert</actionname>
       
   923 				<actiontype>retrieve</actiontype>
       
   924 				<actionbody>
       
   925 					<label>rsacert1</label>
       
   926 				</actionbody>
       
   927 				<actionresult>
       
   928 					<return>KErrPermissionDenied</return>
       
   929 				</actionresult>
       
   930 			</action>
       
   931 		</failactions>
       
   932 
       
   933 		<postactions>
       
   934 			<action>
       
   935 				<actionname>Deleting the writable certificate store manager</actionname>
       
   936 				<actiontype>delete</actiontype>
       
   937 				<actionbody></actionbody>
       
   938 				<actionresult>
       
   939 					<return>KErrNone</return>
       
   940 				</actionresult>
       
   941 			</action>
       
   942 		</postactions>
       
   943 	</actionbody>
       
   944 	<actionresult>
       
   945 		<return>KErrNone</return>
       
   946 	</actionresult>
       
   947 </action>
       
   948 
       
   949 //! @file
       
   950 //! @SYMTestCaseID Sec-tcertstore-apipolicing-2.4
       
   951 //! @SYMTestCaseDesc Test remove user certificate protected by WriteUserData
       
   952 //! @SYMREQ REQ3466
       
   953 //! @SYMTestCasePriority High
       
   954 //! @SYMTestExpectedResults KErrNone
       
   955 <action>
       
   956 	<actionname>2.4, Test remove user certificate protected by WriteUserData</actionname>
       
   957 	<actiontype>policytest</actiontype>
       
   958 	<actionbody>
       
   959 		<testexe>t_certstore.exe</testexe>
       
   960 		<excludedcapabilities>
       
   961 			<capability>TCB</capability>
       
   962 		</excludedcapabilities>
       
   963 		<policy>
       
   964 			<capability>WriteUserData</capability>
       
   965 		</policy>
       
   966 
       
   967 		<preactions>
       
   968 			<action>
       
   969 				<actionname>Opening a writable certificate store manager</actionname>
       
   970 				<actiontype>init</actiontype>
       
   971 				<actionbody>
       
   972 					<mode>write</mode>
       
   973 				</actionbody>
       
   974 				<actionresult>
       
   975 					<return>KErrNone</return>
       
   976 				</actionresult>
       
   977 			</action>
       
   978 		</preactions>
       
   979 
       
   980 		<passactions>
       
   981 			<action>
       
   982 				<actionname>Remove the certificate rsacert1</actionname>
       
   983 				<actiontype>deletecert</actiontype>
       
   984 				<actionbody>
       
   985 					<certtype>user</certtype>
       
   986 					<label>rsacert1</label>
       
   987 				</actionbody>
       
   988 				<actionresult>
       
   989 					<return>KErrNone</return>
       
   990 				</actionresult>
       
   991 			</action>
       
   992 
       
   993 			<action>
       
   994 				<actionname>Get the list of certificates</actionname>
       
   995 				<actiontype>listcert</actiontype>
       
   996 				<actionbody>
       
   997 					<filter>
       
   998 					<ownertype>user</ownertype>
       
   999 					</filter>
       
  1000 				</actionbody>
       
  1001 				<actionresult>
       
  1002 					<return>KErrNone</return>
       
  1003 				</actionresult>
       
  1004 			</action>
       
  1005 		</passactions>
       
  1006 
       
  1007 		<failactions>
       
  1008 			<action>
       
  1009 				<actionname>Remove the certificate rsacert1</actionname>
       
  1010 				<actiontype>deletecert</actiontype>
       
  1011 				<actionbody>
       
  1012 					<certtype>user</certtype>
       
  1013 					<label>rsacert1</label>
       
  1014 				</actionbody>
       
  1015 				<actionresult>
       
  1016 					<return>KErrPermissionDenied</return>
       
  1017 				</actionresult>
       
  1018 			</action>
       
  1019 
       
  1020 			<action>
       
  1021 				<actionname>Get the list of certificates</actionname>
       
  1022 				<actiontype>listcert</actiontype>
       
  1023 				<actionbody>
       
  1024 					<filter>
       
  1025 					<ownertype>user</ownertype>
       
  1026 					</filter>
       
  1027 				</actionbody>
       
  1028 				<actionresult>
       
  1029 					<CCTCertInfo><label>rsacert1</label></CCTCertInfo>
       
  1030 					<return>KErrNone</return>
       
  1031 				</actionresult>
       
  1032 			</action>
       
  1033 		</failactions>
       
  1034 
       
  1035 		<postactions>
       
  1036 			<action>
       
  1037 				<actionname>Deleting the writable certificate store manager</actionname>
       
  1038 				<actiontype>delete</actiontype>
       
  1039 				<actionbody></actionbody>
       
  1040 				<actionresult>
       
  1041 					<return>KErrNone</return>
       
  1042 				</actionresult>
       
  1043 			</action>
       
  1044 		</postactions>
       
  1045 	</actionbody>
       
  1046 	<actionresult>
       
  1047 		<return>KErrNone</return>
       
  1048 	</actionresult>
       
  1049 </action>
       
  1050 
       
  1051  // 3. Test peer certificates
       
  1052  //! @file
       
  1053  //! @SYMTestCaseID Sec-tcertstore-apipolicing-3.1
       
  1054  //! @SYMTestCaseDesc Test add peer certificate protected by WriteUserData
       
  1055  //! @SYMTestExpectedResults KErrNone
       
  1056  
       
  1057  <action>
       
  1058  	<actionname>3.1, Test add peer certificate protected by WriteUserData</actionname>
       
  1059  	<actiontype>policytest</actiontype>
       
  1060  	<actionbody>
       
  1061  		<testexe>t_certstore.exe</testexe>
       
  1062  		<excludedcapabilities>
       
  1063  			<capability>TCB</capability>
       
  1064  		</excludedcapabilities>
       
  1065  		<policy>
       
  1066  			<capability>WriteUserData</capability>
       
  1067  		</policy>
       
  1068  
       
  1069  		<preactions>
       
  1070  			<action>
       
  1071  				<actionname>Opening a writable certificate store manager</actionname>
       
  1072  				<actiontype>init</actiontype>
       
  1073  				<actionbody>
       
  1074  					<mode>write</mode>
       
  1075  				</actionbody>
       
  1076  				<actionresult>
       
  1077  					<return>KErrNone</return>
       
  1078  				</actionresult>
       
  1079  			</action>
       
  1080  		</preactions>
       
  1081  		
       
  1082  		<failactions>
       
  1083  			<action>
       
  1084  				<actionname>Add the certificate U5K3</actionname>
       
  1085  				<actiontype>addcert</actiontype>
       
  1086  				<actionbody>
       
  1087  					<format>X509</format>
       
  1088  					<label>U5K3</label>
       
  1089  					<issuerkey></issuerkey>
       
  1090  					<subjectkey>eeda2c6da84f17519ee837eadb8a5289dadfbb26</subjectkey>
       
  1091  					<certstore>0</certstore>
       
  1092  					<certfile>c:\unifiedcertstore2\U5K3.crt</certfile>
       
  1093  					<certowner>peer</certowner>
       
  1094  				</actionbody>
       
  1095  				<actionresult>
       
  1096  					<return>KErrPermissionDenied</return>
       
  1097  				</actionresult>
       
  1098  			</action>
       
  1099  
       
  1100  			<action>
       
  1101  				<actionname>Get the list of certificates</actionname>
       
  1102  				<actiontype>listpeercert</actiontype>
       
  1103  				<actionbody>
       
  1104 					<filter>
       
  1105 					<ownertype>peer</ownertype>
       
  1106 					</filter>
       
  1107 				</actionbody>
       
  1108  				<actionresult>
       
  1109  					<return>KErrNone</return>
       
  1110  				</actionresult>
       
  1111  			</action>
       
  1112  		</failactions>
       
  1113  
       
  1114  		<passactions>
       
  1115  			<action>
       
  1116  				<actionname>Add the certificate U5K3</actionname>
       
  1117  				<actiontype>addcert</actiontype>
       
  1118  				<actionbody>
       
  1119  					<format>X509</format>
       
  1120  					<label>U5K3</label>
       
  1121  					<issuerkey></issuerkey>
       
  1122  					<subjectkey>eeda2c6da84f17519ee837eadb8a5289dadfbb26</subjectkey>
       
  1123  					<certstore>0</certstore>
       
  1124  					<certfile>c:\unifiedcertstore2\U5K3.crt</certfile>
       
  1125  					<certowner>peer</certowner>
       
  1126  				</actionbody>
       
  1127  				<actionresult>
       
  1128  					<return>KErrNone</return>
       
  1129  				</actionresult>
       
  1130  			</action>
       
  1131  
       
  1132  			<action>
       
  1133  				<actionname>Get the list of certificates</actionname>
       
  1134  				<actiontype>listcert</actiontype>
       
  1135  				<actionbody>
       
  1136 					<filter>
       
  1137 					<ownertype>peer</ownertype>
       
  1138 					</filter>
       
  1139 				</actionbody>
       
  1140  				<actionresult>
       
  1141  					<return>KErrNone</return>
       
  1142  					<CCTCertInfo><label>U5K3</label></CCTCertInfo>
       
  1143  				</actionresult>
       
  1144  			</action>
       
  1145  		</passactions>
       
  1146  
       
  1147  		<postactions>
       
  1148  			<action>
       
  1149  				<actionname>Deleting the writable certificate store manager</actionname>
       
  1150  				<actiontype>delete</actiontype>
       
  1151  				<actionbody></actionbody>
       
  1152  				<actionresult>
       
  1153  					<return>KErrNone</return>
       
  1154  				</actionresult>
       
  1155  			</action>
       
  1156  		</postactions>
       
  1157  	</actionbody>
       
  1158  	<actionresult>
       
  1159  		<return>KErrNone</return>
       
  1160  	</actionresult>
       
  1161  </action>
       
  1162  
       
  1163  //! @file
       
  1164  //! @SYMTestCaseID Sec-tcertstore-apipolicing-3.2
       
  1165  //! @SYMTestCaseDesc Test list not protected by any capability for peer certs
       
  1166  //! @SYMTestExpectedResults KErrNone
       
  1167  
       
  1168  <action>
       
  1169  	<actionname>3.2, Test list not protected by any capability for peer certs</actionname>
       
  1170  	<actiontype>policytest</actiontype>
       
  1171  	<actionbody>
       
  1172  		<testexe>t_certstore.exe</testexe>
       
  1173  		<excludedcapabilities>
       
  1174  			<capability>TCB</capability>
       
  1175  		</excludedcapabilities>
       
  1176  		<policy>
       
  1177  		</policy>
       
  1178  
       
  1179  		<preactions>
       
  1180  			<action>
       
  1181  				<actionname>Opening a writable certificate store manager</actionname>
       
  1182 				<actiontype>init</actiontype>
       
  1183  				<actionbody>
       
  1184  					<mode>write</mode>
       
  1185  				</actionbody>
       
  1186  				<actionresult>
       
  1187  					<return>KErrNone</return>
       
  1188  				</actionresult>
       
  1189  			</action>
       
  1190  		</preactions>
       
  1191  
       
  1192  		<passactions>
       
  1193  			<action>
       
  1194  				<actionname>Get the list of certificates</actionname>
       
  1195  				<actiontype>listcert</actiontype>
       
  1196  				<actionbody>
       
  1197 					<filter>
       
  1198 					<ownertype>peer</ownertype>
       
  1199 					</filter>
       
  1200 				</actionbody>
       
  1201  				<actionresult>
       
  1202  					<return>KErrNone</return>
       
  1203  					<CCTCertInfo><label>U5K3</label></CCTCertInfo>
       
  1204  				</actionresult>
       
  1205  			</action>
       
  1206  		</passactions>
       
  1207  
       
  1208  		<failactions>
       
  1209  		</failactions>
       
  1210  
       
  1211  		<postactions>
       
  1212  			<action>
       
  1213  				<actionname>Deleting the writable certificate store manager</actionname>
       
  1214  				<actiontype>delete</actiontype>
       
  1215  				<actionbody></actionbody>
       
  1216 				<actionresult>
       
  1217  					<return>KErrNone</return>
       
  1218  				</actionresult>
       
  1219  			</action>
       
  1220  		</postactions>
       
  1221  	</actionbody>
       
  1222  	<actionresult>
       
  1223  		<return>KErrNone</return>
       
  1224  	</actionresult>
       
  1225  </action>
       
  1226  
       
  1227  //! @file
       
  1228  //! @SYMTestCaseID Sec-tcertstore-apipolicing-3.3
       
  1229  //! @SYMTestCaseDesc Test retrieve protected by ReadUserData capability for peer certs
       
  1230  //! @SYMTestExpectedResults KErrNone
       
  1231  
       
  1232  <action>
       
  1233  	<actionname>3.3, Test retrieve protected by ReadUserData capability for peer certs</actionname>
       
  1234  	<actiontype>policytest</actiontype>
       
  1235  	<actionbody>
       
  1236  		<testexe>t_certstore.exe</testexe>
       
  1237  		<excludedcapabilities>
       
  1238  			<capability>TCB</capability>
       
  1239 		</excludedcapabilities>
       
  1240  		<policy>
       
  1241  			<capability>ReadUserData</capability>
       
  1242  		</policy>
       
  1243  
       
  1244  		<preactions>
       
  1245  			<action>
       
  1246 				<actionname>Opening a writable certificate store manager</actionname>
       
  1247  				<actiontype>init</actiontype>
       
  1248  				<actionbody>
       
  1249  					<mode>write</mode>
       
  1250  				</actionbody>
       
  1251  				<actionresult>
       
  1252  					<return>KErrNone</return>
       
  1253  				</actionresult>
       
  1254  			</action>
       
  1255  		</preactions>
       
  1256  
       
  1257  		<passactions>
       
  1258  			<action>
       
  1259  				<actionname>Retrieve U5K3 cert</actionname>
       
  1260  				<actiontype>retrieve</actiontype>
       
  1261  				<actionbody>
       
  1262  					<label>U5K3</label>
       
  1263  				</actionbody>
       
  1264  				<actionresult>
       
  1265  					<return>KErrNone</return>
       
  1266  				</actionresult>
       
  1267  			</action>
       
  1268  		</passactions>
       
  1269  
       
  1270  		<failactions>
       
  1271  			<action>
       
  1272  				<actionname>Retrieve U5K3 cert</actionname>
       
  1273  				<actiontype>retrieve</actiontype>
       
  1274  				<actionbody>
       
  1275  					<label>U5K3</label>
       
  1276  				</actionbody>
       
  1277  				<actionresult>
       
  1278  					<return>KErrPermissionDenied</return>
       
  1279  				</actionresult>
       
  1280  			</action>
       
  1281  		</failactions>
       
  1282  
       
  1283  		<postactions>
       
  1284  			<action>
       
  1285  				<actionname>Deleting the writable certificate store manager</actionname>
       
  1286  				<actiontype>delete</actiontype>
       
  1287  				<actionbody></actionbody>
       
  1288  				<actionresult>
       
  1289  					<return>KErrNone</return>
       
  1290  				</actionresult>
       
  1291  			</action>
       
  1292  		</postactions>
       
  1293  	</actionbody>
       
  1294  	<actionresult>
       
  1295  		<return>KErrNone</return>
       
  1296  	</actionresult>
       
  1297  </action>
       
  1298  
       
  1299  //! @file
       
  1300  //! @SYMTestCaseID Sec-tcertstore-apipolicing-3.4
       
  1301  //! @SYMTestCaseDesc Test remove peer certificate protected by WriteUserData
       
  1302  //! @SYMTestExpectedResults KErrNone
       
  1303  
       
  1304  <action>
       
  1305  	<actionname>3.4, Test remove peer certificate protected by WriteUserData</actionname>
       
  1306  	<actiontype>policytest</actiontype>
       
  1307  	<actionbody>
       
  1308  		<testexe>t_certstore.exe</testexe>
       
  1309  		<excludedcapabilities>
       
  1310  			<capability>TCB</capability>
       
  1311  		</excludedcapabilities>
       
  1312  		<policy>
       
  1313  			<capability>WriteUserData</capability>
       
  1314  		</policy>
       
  1315  
       
  1316  		<preactions>
       
  1317  			<action>
       
  1318  				<actionname>Opening a writable certificate store manager</actionname>
       
  1319  				<actiontype>init</actiontype>
       
  1320  				<actionbody>
       
  1321  					<mode>write</mode>
       
  1322  				</actionbody>
       
  1323  				<actionresult>
       
  1324  					<return>KErrNone</return>
       
  1325  				</actionresult>
       
  1326  			</action>
       
  1327  		</preactions>
       
  1328  
       
  1329  		<passactions>
       
  1330  			<action>
       
  1331  				<actionname>Remove the certificate U5K3</actionname>
       
  1332  				<actiontype>deletecert</actiontype>
       
  1333  				<actionbody>
       
  1334  					<certtype>peer</certtype>
       
  1335  					<label>U5K3</label>
       
  1336  				</actionbody>
       
  1337  				<actionresult>
       
  1338  					<return>KErrNone</return>
       
  1339  				</actionresult>
       
  1340  			</action>
       
  1341  
       
  1342  			<action>
       
  1343  				<actionname>Get the list of certificates</actionname>
       
  1344  				<actiontype>listcert</actiontype>
       
  1345  				<actionbody>
       
  1346 					<filter>
       
  1347 					<ownertype>peer</ownertype>
       
  1348 					</filter>
       
  1349 				</actionbody>
       
  1350  				<actionresult>
       
  1351  					<return>KErrNone</return>
       
  1352  				</actionresult>
       
  1353  			</action>
       
  1354  		</passactions>
       
  1355  
       
  1356  		<failactions>
       
  1357  			<action>
       
  1358  				<actionname>Remove the certificate U5K3</actionname>
       
  1359  				<actiontype>deletecert</actiontype>
       
  1360  				<actionbody>
       
  1361  					<certtype>peer</certtype>
       
  1362  					<label>U5K3</label>
       
  1363  				</actionbody>
       
  1364  				<actionresult>
       
  1365  					<return>KErrPermissionDenied</return>
       
  1366  				</actionresult>
       
  1367  			</action>
       
  1368  
       
  1369  			<action>
       
  1370  				<actionname>Get the list of certificates</actionname>
       
  1371  				<actiontype>listcert</actiontype>
       
  1372  				<actionbody>
       
  1373 					<filter>
       
  1374 					<ownertype>peer</ownertype>
       
  1375 					</filter>
       
  1376 				</actionbody>
       
  1377  				<actionresult>
       
  1378  					<CCTCertInfo><label>U5K3</label></CCTCertInfo>
       
  1379  					<return>KErrNone</return>
       
  1380  				</actionresult>
       
  1381  			</action>
       
  1382  		</failactions>
       
  1383  
       
  1384  		<postactions>
       
  1385  			<action>
       
  1386  				<actionname>Deleting the writable certificate store manager</actionname>
       
  1387  				<actiontype>delete</actiontype>
       
  1388  				<actionbody></actionbody>
       
  1389  				<actionresult>
       
  1390  					<return>KErrNone</return>
       
  1391  				</actionresult>
       
  1392  			</action>
       
  1393  		</postactions>
       
  1394  	</actionbody>
       
  1395  	<actionresult>
       
  1396  		<return>KErrNone</return>
       
  1397  	</actionresult>
       
  1398  </action>
       
  1399  
       
  1400 
       
  1401 // 4. Cleanup
       
  1402 
       
  1403 //! @file
       
  1404 //! @SYMTestCaseID Sec-tcertstore-apipolicing-4.1
       
  1405 //! @SYMTestCaseDesc Delete all certs
       
  1406 //! @SYMREQ REQ3466
       
  1407 //! @SYMTestCasePriority High
       
  1408 //! @SYMTestExpectedResults KErrNone
       
  1409 <action>
       
  1410 	<actionname>Delete all certs</actionname>
       
  1411 	<actiontype>deletecert</actiontype>
       
  1412 	<actionbody>
       
  1413 		<label>*.*</label>
       
  1414 		<deleteallcerts>1</deleteallcerts>
       
  1415 	</actionbody>
       
  1416 	<actionresult>
       
  1417 		<return>KErrNone</return>
       
  1418 	</actionresult>
       
  1419 </action>
       
  1420 
       
  1421 //! @file
       
  1422 //! @SYMTestCaseID Sec-tcertstore-apipolicing-4.2
       
  1423 //! @SYMTestCaseDesc Deleting the writable certificate store manager
       
  1424 //! @SYMREQ REQ3466
       
  1425 //! @SYMTestCasePriority High
       
  1426 //! @SYMTestExpectedResults KErrNone
       
  1427 <action>
       
  1428 	<actionname>Deleting the writable certificate store manager</actionname>
       
  1429 	<actiontype>delete</actiontype>
       
  1430 	<actionbody></actionbody>
       
  1431 	<actionresult>
       
  1432 		<return>KErrNone</return>
       
  1433 	</actionresult>
       
  1434 </action>