os/security/cryptoservices/filebasedcertificateandkeystores/test/tkeystore/scripts/servoom.script
First public contribution.
2 // Copyright (c) 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".
9 // Initial Contributors:
10 // Nokia Corporation - initial contribution.
17 START_TESTCASE SEC-FILETOKENS-SERVOOM-0001
19 //! @SYMTestCaseID SEC-FILETOKENS-SERVOOM-0001
23 //! Keystore server OOM tests
27 //! Testing key generatation has been diabled for the moment.
33 //! /////////////////////////////////////////////////////////////////////////////
35 //! Test case 1: Initialise the store
37 //! /////////////////////////////////////////////////////////////////////////////
39 //! @SYMTestActions 1) Delete keystore data file
41 //! 2) Start server OOM testing
43 //! 3) 1,Opening key store in manager mode
45 //! 4) 1.0.1 NOT A TEST Delete everything
47 RUN_TEST_STEP -1 CTestHandler deletekeystoredata
49 RUN_TEST_STEP -1 CTestHandler startserveroom
51 RUN_TEST_STEP -1 CTestHandler init servoom.ini SEC-FILETOKENS-SERVOOM-0001-003
53 RUN_TEST_STEP -1 CTestHandler deletekeys
55 END_TESTCASE SEC-FILETOKENS-SERVOOM-0001
61 START_TESTCASE SEC-FILETOKENS-SERVOOM-0002
63 //! @SYMTestCaseID SEC-FILETOKENS-SERVOOM-0002
65 //! @SYMTestCaseDesc /////////////////////////////////////////////////////////////////////////////
67 //! Test case 2: Add the "Banana" key
69 //! /////////////////////////////////////////////////////////////////////////////
71 //! @SYMTestActions 1) 2,Add a key
73 //! 2) 2.1,Set passphrase timeout to "don't cache"
75 RUN_TEST_STEP -1 CTestHandler addkey servoom.ini SEC-FILETOKENS-SERVOOM-0002-001
77 RUN_TEST_STEP -1 CTestHandler settimeout servoom.ini SEC-FILETOKENS-SERVOOM-0002-002
79 END_TESTCASE SEC-FILETOKENS-SERVOOM-0002
85 START_TESTCASE SEC-FILETOKENS-SERVOOM-0003
87 //! @SYMTestCaseID SEC-FILETOKENS-SERVOOM-0003
89 //! @SYMTestCaseDesc /////////////////////////////////////////////////////////////////////////////
91 //! Test case 3: List the keys, should only find "Banana"
93 //! /////////////////////////////////////////////////////////////////////////////
95 //! @SYMTestActions 1) 3 List everything
97 RUN_TEST_STEP -1 CTestHandler listkeys servoom.ini SEC-FILETOKENS-SERVOOM-0003-001
99 END_TESTCASE SEC-FILETOKENS-SERVOOM-0003
105 START_TESTCASE SEC-FILETOKENS-SERVOOM-0004
107 //! @SYMTestCaseID SEC-FILETOKENS-SERVOOM-0004
109 //! @SYMTestCaseDesc /////////////////////////////////////////////////////////////////////////////
111 //! Test case 4: Delete "Banana" key
113 //! /////////////////////////////////////////////////////////////////////////////
115 //! @SYMTestActions 1) 4. Delete the key
117 RUN_TEST_STEP -1 CTestHandler deletekeys servoom.ini SEC-FILETOKENS-SERVOOM-0004-001
119 END_TESTCASE SEC-FILETOKENS-SERVOOM-0004
125 START_TESTCASE SEC-FILETOKENS-SERVOOM-0005
127 //! @SYMTestCaseID SEC-FILETOKENS-SERVOOM-0005
129 //! @SYMTestCaseDesc /////////////////////////////////////////////////////////////////////////////
131 //! Test case 5: List the keys, should find nothing
133 //! /////////////////////////////////////////////////////////////////////////////
135 //! @SYMTestActions 1) 3 List everything
137 //! 2) 2,Add a larger key
139 //! 3) 1.1.5.4,Add a key with a very long label
141 //! 4) 1.1.5.6,Add a DSA key
143 //! 5) 1.1.5.7,Add a DH key
145 //! 6) 1.1.5.7.1,Open it
147 //! 7) 1.1.5.7.2, Test derive
149 //! 8) 1.1.6,Add a key with illegal usage
151 //! 9) 1.1.7,Add a key with illegal usage
153 //! 10) 1.1.8,Add a key with illegal usage
155 //! 11) 1.2 List everything (including illegal usage keys)
157 //! 12) 1.3.1 List DSA keys (including illegal usage keys)
159 //! 13) 1.3.2 List Sign-usage keys (including illegal usage keys)
161 //! 14) 1.3.3 List 'All usages' keys (including illegal usage keys)
163 //! 15) 1.4.1, Delete RSA keys
165 //! 16) 1.4.2 List RSA keys
167 //! 17) 1.4.3 List everything (including illegal usage keys)
169 //! 18) 1.4.4,Add a key that was previously deleted
171 //! 19) 1.4.5 List RSA keys (including illegal usage keys)
173 //! 20) 1.4.6 List everything (including illegal usage keys)
175 RUN_TEST_STEP -1 CTestHandler listkeys servoom.ini SEC-FILETOKENS-SERVOOM-0005-001
177 RUN_TEST_STEP -1 CTestHandler addkey servoom.ini SEC-FILETOKENS-SERVOOM-0005-002
179 RUN_TEST_STEP -1 CTestHandler addkey servoom.ini SEC-FILETOKENS-SERVOOM-0005-003
181 RUN_TEST_STEP -1 CTestHandler addkey servoom.ini SEC-FILETOKENS-SERVOOM-0005-004
183 RUN_TEST_STEP -1 CTestHandler addkey servoom.ini SEC-FILETOKENS-SERVOOM-0005-005
185 RUN_TEST_STEP -1 CTestHandler open servoom.ini SEC-FILETOKENS-SERVOOM-0005-006
187 RUN_TEST_STEP -1 CTestHandler derive servoom.ini SEC-FILETOKENS-SERVOOM-0005-007
189 RUN_TEST_STEP -1 CTestHandler addkey servoom.ini SEC-FILETOKENS-SERVOOM-0005-008
191 RUN_TEST_STEP -1 CTestHandler addkey servoom.ini SEC-FILETOKENS-SERVOOM-0005-009
193 RUN_TEST_STEP -1 CTestHandler addkey servoom.ini SEC-FILETOKENS-SERVOOM-0005-010
195 RUN_TEST_STEP -1 CTestHandler listkeys servoom.ini SEC-FILETOKENS-SERVOOM-0005-011
197 RUN_TEST_STEP -1 CTestHandler listkeys servoom.ini SEC-FILETOKENS-SERVOOM-0005-012
199 RUN_TEST_STEP -1 CTestHandler listkeys servoom.ini SEC-FILETOKENS-SERVOOM-0005-013
201 RUN_TEST_STEP -1 CTestHandler listkeys servoom.ini SEC-FILETOKENS-SERVOOM-0005-014
203 RUN_TEST_STEP -1 CTestHandler deletekeys servoom.ini SEC-FILETOKENS-SERVOOM-0005-015
205 RUN_TEST_STEP -1 CTestHandler listkeys servoom.ini SEC-FILETOKENS-SERVOOM-0005-016
207 RUN_TEST_STEP -1 CTestHandler listkeys servoom.ini SEC-FILETOKENS-SERVOOM-0005-017
209 RUN_TEST_STEP -1 CTestHandler addkey servoom.ini SEC-FILETOKENS-SERVOOM-0005-018
211 RUN_TEST_STEP -1 CTestHandler listkeys servoom.ini SEC-FILETOKENS-SERVOOM-0005-019
213 RUN_TEST_STEP -1 CTestHandler listkeys servoom.ini SEC-FILETOKENS-SERVOOM-0005-020
215 END_TESTCASE SEC-FILETOKENS-SERVOOM-0005
221 START_TESTCASE SEC-FILETOKENS-SERVOOM-0006
223 //! @SYMTestCaseID SEC-FILETOKENS-SERVOOM-0006
225 //! @SYMTestCaseDesc //////////////////////////////////////////////////////////////////////////////
229 //! //////////////////////////////////////////////////////////////////////////////
231 //! @SYMTestActions 1) 1.0.0.2.1,Open it
233 //! 2) 1.0.0.2.2,Open a banana for decrypt
237 //! 4) 1.0.0.2.2.1, Sign with a banana, 20 char text
239 //! 5) 1.0.0.2.2.2, Sign with a banana, 32 char text
241 //! 6) 1.0.0.2.2.2.1, Sign digest with a banana
243 //! 7) 1.4.5, Delete it again
245 RUN_TEST_STEP -1 CTestHandler open servoom.ini SEC-FILETOKENS-SERVOOM-0006-001
247 RUN_TEST_STEP -1 CTestHandler open servoom.ini SEC-FILETOKENS-SERVOOM-0006-002
249 RUN_TEST_STEP -1 CTestHandler decrypt servoom.ini SEC-FILETOKENS-SERVOOM-0006-003
251 RUN_TEST_STEP -1 CTestHandler sign servoom.ini SEC-FILETOKENS-SERVOOM-0006-004
253 RUN_TEST_STEP -1 CTestHandler sign servoom.ini SEC-FILETOKENS-SERVOOM-0006-005
255 RUN_TEST_STEP -1 CTestHandler sign servoom.ini SEC-FILETOKENS-SERVOOM-0006-006
257 RUN_TEST_STEP -1 CTestHandler deletekeys servoom.ini SEC-FILETOKENS-SERVOOM-0006-007
259 END_TESTCASE SEC-FILETOKENS-SERVOOM-0006
265 START_TESTCASE SEC-FILETOKENS-SERVOOM-0007
267 //! @SYMTestCaseID SEC-FILETOKENS-SERVOOM-0007
269 //! @SYMTestCaseDesc //////////////////////////////////////////////////////////////////////////////
273 //! //////////////////////////////////////////////////////////////////////////////
275 //! @SYMTestActions 1) 1.0.0.10,Get carrot
277 //! 2) 1.0.0.10.1, Sign with a carrot, 20 char text
279 //! 3) 1.0.0.10.2, Sign with carrot, text too long (21 chars)
281 //! 4) 1.0.0.10.2, Sign digest with carrot
283 //! 5) 1.0.0.10.3, Sign digest with a carrot, fail hash
285 //! 6) 1.4.5, Delete it again
287 //! 7) 1.5.8.1 List everything (including illegal usage keys)
289 //! 8) 1.5.8.2, Delete everything
291 //! 9) 1.5.9 List everything
293 RUN_TEST_STEP -1 CTestHandler getkeyinfo servoom.ini SEC-FILETOKENS-SERVOOM-0007-001
295 RUN_TEST_STEP -1 CTestHandler sign servoom.ini SEC-FILETOKENS-SERVOOM-0007-002
297 RUN_TEST_STEP !Error=-9 -1 CTestHandler sign servoom.ini SEC-FILETOKENS-SERVOOM-0007-003
299 RUN_TEST_STEP -1 CTestHandler sign servoom.ini SEC-FILETOKENS-SERVOOM-0007-004
301 RUN_TEST_STEP !Error=-2 -1 CTestHandler sign servoom.ini SEC-FILETOKENS-SERVOOM-0007-005
303 RUN_TEST_STEP -1 CTestHandler deletekeys servoom.ini SEC-FILETOKENS-SERVOOM-0007-006
305 RUN_TEST_STEP -1 CTestHandler listkeys servoom.ini SEC-FILETOKENS-SERVOOM-0007-007
307 RUN_TEST_STEP -1 CTestHandler deletekeys servoom.ini SEC-FILETOKENS-SERVOOM-0007-008
309 RUN_TEST_STEP -1 CTestHandler listkeys servoom.ini SEC-FILETOKENS-SERVOOM-0007-009
311 END_TESTCASE SEC-FILETOKENS-SERVOOM-0007
317 START_TESTCASE SEC-FILETOKENS-SERVOOM-0008
319 //! @SYMTestCaseID SEC-FILETOKENS-SERVOOM-0008
321 //! @SYMTestCaseDesc Test importing keys
323 //! @SYMTestActions 1) 26, Import a PKCS5 encrypted DSA key
325 //! 2) 27, List DSA keys (TEST ID: GT0140-KEY001)
327 //! 3) 28, Delete everything
329 RUN_TEST_STEP -1 CTestHandler importkey servoom.ini SEC-FILETOKENS-SERVOOM-0008-001
331 RUN_TEST_STEP -1 CTestHandler listkeys servoom.ini SEC-FILETOKENS-SERVOOM-0008-002
333 RUN_TEST_STEP -1 CTestHandler deletekeys servoom.ini SEC-FILETOKENS-SERVOOM-0008-003
335 END_TESTCASE SEC-FILETOKENS-SERVOOM-0008
341 START_TESTCASE SEC-FILETOKENS-SERVOOM-0009
343 //! @SYMTestCaseID SEC-FILETOKENS-SERVOOM-0009
345 //! @SYMTestCaseDesc Test exporting keys
347 //! @SYMTestActions 1) 1.1.0 Import a RSA key
349 //! 2) 1.1.0.1, Set passphrase timeout to "don't cache"
351 //! 3) 1.1.5 Export a RSA key
353 //! 4) 1.4.1 Import a DSA key
355 //! 5) 1.4.6 Export a DSA key
357 //! 6) 1.7.6 Export a RSA key in encrypted format
359 //! 7) 1.9.6 Export a DSA key in encrypted format
361 //! 8) 1.10.0 NOT A TEST Delete everything
363 ** Basic sanity check for PKCS8 encrypted DSA key import/export **
365 RUN_TEST_STEP -1 CTestHandler importkey servoom.ini SEC-FILETOKENS-SERVOOM-0009-001
367 RUN_TEST_STEP -1 CTestHandler settimeout servoom.ini SEC-FILETOKENS-SERVOOM-0009-002
369 RUN_TEST_STEP -1 CTestHandler exportkey servoom.ini SEC-FILETOKENS-SERVOOM-0009-003
371 RUN_TEST_STEP -1 CTestHandler importkey servoom.ini SEC-FILETOKENS-SERVOOM-0009-004
373 RUN_TEST_STEP -1 CTestHandler exportkey servoom.ini SEC-FILETOKENS-SERVOOM-0009-005
375 RUN_TEST_STEP -1 CTestHandler exportkey servoom.ini SEC-FILETOKENS-SERVOOM-0009-006
377 RUN_TEST_STEP -1 CTestHandler exportkey servoom.ini SEC-FILETOKENS-SERVOOM-0009-007
379 RUN_TEST_STEP -1 CTestHandler deletekeys
381 END_TESTCASE SEC-FILETOKENS-SERVOOM-0009
387 START_TESTCASE SEC-FILETOKENS-SERVOOM-0010
389 //! @SYMTestCaseID SEC-FILETOKENS-SERVOOM-0010
391 //! @SYMTestCaseDesc Test authentication objects (snippets of authobjects.txt)
393 //! @SYMTestActions 1) 2.1, Add a key
395 //! 2) 2.2, List protected objects
397 //! 3) 3.5, Change the passphrase
399 //! 4) 0.7.2, Set passphrase timeout to 15 seconds
401 //! 5) 1.1.2, Get timeout, expect 15 seconds
403 //! 6) 1.4.1.5, Open banana
405 //! 7) 1.3.1, Get time remaining, expect 15 seconds
407 //! 8) 1.4.2.2, Close object
409 //! 9) 3.8, Delete everything
411 RUN_TEST_STEP -1 CTestHandler addkey servoom.ini SEC-FILETOKENS-SERVOOM-0010-001
413 RUN_TEST_STEP -1 CTestHandler listprotectedobjects servoom.ini SEC-FILETOKENS-SERVOOM-0010-002
415 RUN_TEST_STEP -1 CTestHandler changepassphrase servoom.ini SEC-FILETOKENS-SERVOOM-0010-003
417 RUN_TEST_STEP -1 CTestHandler settimeout servoom.ini SEC-FILETOKENS-SERVOOM-0010-004
419 RUN_TEST_STEP -1 CTestHandler gettimeout servoom.ini SEC-FILETOKENS-SERVOOM-0010-005
421 RUN_TEST_STEP -1 CTestHandler authopen servoom.ini SEC-FILETOKENS-SERVOOM-0010-006
423 RUN_TEST_STEP -1 CTestHandler timeremaining servoom.ini SEC-FILETOKENS-SERVOOM-0010-007
425 RUN_TEST_STEP -1 CTestHandler authclose servoom.ini SEC-FILETOKENS-SERVOOM-0010-008
427 RUN_TEST_STEP -1 CTestHandler deletekeys servoom.ini SEC-FILETOKENS-SERVOOM-0010-009
429 END_TESTCASE SEC-FILETOKENS-SERVOOM-0010
435 START_TESTCASE SEC-FILETOKENS-SERVOOM-0011
437 //! @SYMTestCaseID SEC-FILETOKENS-SERVOOM-0011
439 //! @SYMTestCaseDesc End of testing
441 //! @SYMTestActions 1) 999.1, Closing key store
443 //! 2) Stop server OOM testing
445 //! 3) 999.2, Sleep 5 seconds
447 //! 4) 999.3, Check for server heap error
449 RUN_TEST_STEP -1 CTestHandler delete
451 RUN_TEST_STEP -1 CTestHandler stopserveroom
453 RUN_TEST_STEP -1 CTestHandler sleep servoom.ini SEC-FILETOKENS-SERVOOM-0011-003
455 RUN_TEST_STEP -1 CTestHandler checkserverheaperror
457 END_TESTCASE SEC-FILETOKENS-SERVOOM-0011