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