os/security/cryptoservices/filebasedcertificateandkeystores/test/tkeystore/scripts/cancel.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-CANCEL-0001
19 //! @SYMTestCaseID SEC-FILETOKENS-CANCEL-0001
23 //! @SYMTestActions 1) 1, Delete keystore data file
27 RUN_TEST_STEP -1 CTestHandler deletekeystoredata
29 RUN_TEST_STEP -1 CTestHandler startcancellation
31 END_TESTCASE SEC-FILETOKENS-CANCEL-0001
37 START_TESTCASE SEC-FILETOKENS-CANCEL-0002
39 //! @SYMTestCaseID SEC-FILETOKENS-CANCEL-0002
41 //! @SYMTestCaseDesc Start of testing
43 //! @SYMTestActions 1) 1.2,Opening key store in manager mode
45 //! 2) 1.2.0.1 NOT A TEST Delete everything
49 RUN_TEST_STEP -1 CTestHandler init cancel.ini SEC-FILETOKENS-CANCEL-0002-001
51 RUN_TEST_STEP -1 CTestHandler deletekeys
53 RUN_TEST_STEP -1 CTestHandler addkey cancel.ini SEC-FILETOKENS-CANCEL-0002-003
55 END_TESTCASE SEC-FILETOKENS-CANCEL-0002
61 START_TESTCASE SEC-FILETOKENS-CANCEL-0003
63 //! @SYMTestCaseID SEC-FILETOKENS-CANCEL-0003
65 //! @SYMTestCaseDesc /////////////////////////////////////////////////////////////////////////////
67 //! Test case 3: List the keys, should only find "Banana"
69 //! /////////////////////////////////////////////////////////////////////////////
71 //! @SYMTestActions 1) 3 List everything
73 //! 2) 3.1,Get it again
75 //! 3) 3.3.1,Set passphrase timeout to "don't cache"
79 //! 5) 3.3,Open a banana for decrypt
81 //! 6) 3.4, Sign with a banana, 20 char text
83 //! 7) 3.5, Sign digest with a banana
85 //! 8) 3.6, Decrypt with a banana
87 RUN_TEST_STEP -1 CTestHandler listkeys cancel.ini SEC-FILETOKENS-CANCEL-0003-001
89 RUN_TEST_STEP -1 CTestHandler getkeyinfo cancel.ini SEC-FILETOKENS-CANCEL-0003-002
91 RUN_TEST_STEP -1 CTestHandler settimeout cancel.ini SEC-FILETOKENS-CANCEL-0003-003
93 RUN_TEST_STEP -1 CTestHandler open cancel.ini SEC-FILETOKENS-CANCEL-0003-004
95 RUN_TEST_STEP -1 CTestHandler open cancel.ini SEC-FILETOKENS-CANCEL-0003-005
97 RUN_TEST_STEP -1 CTestHandler sign cancel.ini SEC-FILETOKENS-CANCEL-0003-006
99 RUN_TEST_STEP -1 CTestHandler sign cancel.ini SEC-FILETOKENS-CANCEL-0003-007
101 RUN_TEST_STEP -1 CTestHandler decrypt cancel.ini SEC-FILETOKENS-CANCEL-0003-008
103 END_TESTCASE SEC-FILETOKENS-CANCEL-0003
109 START_TESTCASE SEC-FILETOKENS-CANCEL-0004
111 //! @SYMTestCaseID SEC-FILETOKENS-CANCEL-0004
113 //! @SYMTestCaseDesc /////////////////////////////////////////////////////////////////////////////
115 //! Test case 4: Delete "Banana" key
117 //! /////////////////////////////////////////////////////////////////////////////
119 //! @SYMTestActions 1) 4. Delete the key
121 RUN_TEST_STEP -1 CTestHandler deletekeys cancel.ini SEC-FILETOKENS-CANCEL-0004-001
123 END_TESTCASE SEC-FILETOKENS-CANCEL-0004
129 START_TESTCASE SEC-FILETOKENS-CANCEL-0005
131 //! @SYMTestCaseID SEC-FILETOKENS-CANCEL-0005
133 //! @SYMTestCaseDesc /////////////////////////////////////////////////////////////////////////////
135 //! Test case 5: List the keys, should find nothing
137 //! /////////////////////////////////////////////////////////////////////////////
139 //! @SYMTestActions 1) 5 List everything
141 //! 2) 6,Add a larger key
143 //! 3) 7,Add a key with a very long label
145 //! 4) 8,Get that key again
147 //! 5) 9,Open that key again
149 //! 6) 1.1.5.6,Add a key
151 //! 7) 1.1.5.6.1, Sign with a carrot, 20 char text
153 //! 8) 1.1.5.7,Add a key
155 //! 9) 1.1.5.7.1,Open it
157 //! 10) 1.1.5.7.2, Test derive
159 //! 11) 10,Add a key with illegal usage
161 //! 12) 11,Add a key with illegal usage
163 //! 13) 12,Add a key with illegal usage
165 //! 14) 13 List everything (including illegal usage keys)
167 //! 15) 14 List DSA keys (including illegal usage keys)
169 //! 16) 15 List Sign-usage keys (including illegal usage keys)
171 //! 17) 16 List 'All usages' keys (including illegal usage keys)
173 //! 18) 17, Delete RSA keys
175 //! 19) 18 List RSA keys
177 //! 20) 19 List everything (including illegal usage keys)
179 //! 21) 20,Add a key that was previously deleted
181 //! 22) 21 List RSA keys
183 //! 23) 22 List everything (including illegal usage keys)
185 //! 24) 23, Delete it again
187 //! 25) 24, Delete everything
189 //! 26) 25 List everything
191 RUN_TEST_STEP -1 CTestHandler listkeys cancel.ini SEC-FILETOKENS-CANCEL-0005-001
193 RUN_TEST_STEP -1 CTestHandler addkey cancel.ini SEC-FILETOKENS-CANCEL-0005-002
195 RUN_TEST_STEP -1 CTestHandler addkey cancel.ini SEC-FILETOKENS-CANCEL-0005-003
197 RUN_TEST_STEP -1 CTestHandler getkeyinfo cancel.ini SEC-FILETOKENS-CANCEL-0005-004
199 RUN_TEST_STEP -1 CTestHandler open cancel.ini SEC-FILETOKENS-CANCEL-0005-005
201 RUN_TEST_STEP -1 CTestHandler addkey cancel.ini SEC-FILETOKENS-CANCEL-0005-006
203 RUN_TEST_STEP -1 CTestHandler sign cancel.ini SEC-FILETOKENS-CANCEL-0005-007
205 RUN_TEST_STEP -1 CTestHandler addkey cancel.ini SEC-FILETOKENS-CANCEL-0005-008
207 RUN_TEST_STEP -1 CTestHandler open cancel.ini SEC-FILETOKENS-CANCEL-0005-009
209 RUN_TEST_STEP -1 CTestHandler derive cancel.ini SEC-FILETOKENS-CANCEL-0005-010
211 RUN_TEST_STEP -1 CTestHandler addkey cancel.ini SEC-FILETOKENS-CANCEL-0005-011
213 RUN_TEST_STEP -1 CTestHandler addkey cancel.ini SEC-FILETOKENS-CANCEL-0005-012
215 RUN_TEST_STEP -1 CTestHandler addkey cancel.ini SEC-FILETOKENS-CANCEL-0005-013
217 RUN_TEST_STEP -1 CTestHandler listkeys cancel.ini SEC-FILETOKENS-CANCEL-0005-014
219 RUN_TEST_STEP -1 CTestHandler listkeys cancel.ini SEC-FILETOKENS-CANCEL-0005-015
221 RUN_TEST_STEP -1 CTestHandler listkeys cancel.ini SEC-FILETOKENS-CANCEL-0005-016
223 RUN_TEST_STEP -1 CTestHandler listkeys cancel.ini SEC-FILETOKENS-CANCEL-0005-017
225 RUN_TEST_STEP -1 CTestHandler deletekeys cancel.ini SEC-FILETOKENS-CANCEL-0005-018
227 RUN_TEST_STEP -1 CTestHandler listkeys cancel.ini SEC-FILETOKENS-CANCEL-0005-019
229 RUN_TEST_STEP -1 CTestHandler listkeys cancel.ini SEC-FILETOKENS-CANCEL-0005-020
231 RUN_TEST_STEP -1 CTestHandler addkey cancel.ini SEC-FILETOKENS-CANCEL-0005-021
233 RUN_TEST_STEP -1 CTestHandler listkeys cancel.ini SEC-FILETOKENS-CANCEL-0005-022
235 RUN_TEST_STEP -1 CTestHandler listkeys cancel.ini SEC-FILETOKENS-CANCEL-0005-023
237 RUN_TEST_STEP -1 CTestHandler deletekeys cancel.ini SEC-FILETOKENS-CANCEL-0005-024
239 RUN_TEST_STEP -1 CTestHandler deletekeys cancel.ini SEC-FILETOKENS-CANCEL-0005-025
241 RUN_TEST_STEP -1 CTestHandler listkeys cancel.ini SEC-FILETOKENS-CANCEL-0005-026
243 END_TESTCASE SEC-FILETOKENS-CANCEL-0005
249 START_TESTCASE SEC-FILETOKENS-CANCEL-0006
251 //! @SYMTestCaseID SEC-FILETOKENS-CANCEL-0006
253 //! @SYMTestCaseDesc Test importing keys
255 //! @SYMTestActions 1) 26, Import a PKCS5 encrypted DSA key
257 //! 2) 27, List DSA keys (TEST ID: GT0140-KEY001)
259 //! 3) 28, Delete everything
261 RUN_TEST_STEP -1 CTestHandler importkey cancel.ini SEC-FILETOKENS-CANCEL-0006-001
263 RUN_TEST_STEP -1 CTestHandler listkeys cancel.ini SEC-FILETOKENS-CANCEL-0006-002
265 RUN_TEST_STEP -1 CTestHandler deletekeys cancel.ini SEC-FILETOKENS-CANCEL-0006-003
267 END_TESTCASE SEC-FILETOKENS-CANCEL-0006
273 START_TESTCASE SEC-FILETOKENS-CANCEL-0007
275 //! @SYMTestCaseID SEC-FILETOKENS-CANCEL-0007
277 //! @SYMTestCaseDesc Test export
279 //! @SYMTestActions 1) 1.1.1 Import a RSA key
281 //! 2) 1.1.0.1, Set passphrase timeout to "don't cache"
283 //! 3) 1.1.5 Export a RSA key
285 //! 4) 1.4.1 Import a DSA key
287 //! 5) 1.4.6 Export a DSA key
289 //! 6) 1.7.6 Export a RSA key in encrypted format
291 //! 7) 1.9.6 Export a DSA key in encrypted format
293 //! 8) 1.10.0 NOT A TEST Delete everything
295 ** Basic sanity check for PKCS8 encrypted DSA key import/export **
297 RUN_TEST_STEP -1 CTestHandler importkey cancel.ini SEC-FILETOKENS-CANCEL-0007-001
299 RUN_TEST_STEP -1 CTestHandler settimeout cancel.ini SEC-FILETOKENS-CANCEL-0007-002
301 RUN_TEST_STEP -1 CTestHandler exportkey cancel.ini SEC-FILETOKENS-CANCEL-0007-003
303 RUN_TEST_STEP -1 CTestHandler importkey cancel.ini SEC-FILETOKENS-CANCEL-0007-004
305 RUN_TEST_STEP -1 CTestHandler exportkey cancel.ini SEC-FILETOKENS-CANCEL-0007-005
307 RUN_TEST_STEP -1 CTestHandler exportkey cancel.ini SEC-FILETOKENS-CANCEL-0007-006
309 RUN_TEST_STEP -1 CTestHandler exportkey cancel.ini SEC-FILETOKENS-CANCEL-0007-007
311 RUN_TEST_STEP -1 CTestHandler deletekeys
313 END_TESTCASE SEC-FILETOKENS-CANCEL-0007
319 START_TESTCASE SEC-FILETOKENS-CANCEL-0008
321 //! @SYMTestCaseID SEC-FILETOKENS-CANCEL-0008
323 //! @SYMTestCaseDesc Test authentication objects (snippets of authobjects.txt)
325 //! @SYMTestActions 1) 2.1, Add a key
327 //! 2) 2.2, List protected objects
329 //! 3) 3.5, Change the passphrase
331 //! 4) 0.7.2, Set passphrase timeout to 15 seconds
333 //! 5) 1.1.2, Get timeout, expect 15 seconds
335 //! 6) 1.4.1.5, Open banana
337 //! 7) 1.3.1, Get time remaining, expect 15 seconds
339 //! 8) 1.4.2.2, Close object
341 //! 9) 3.8, Delete everything
343 RUN_TEST_STEP -1 CTestHandler addkey cancel.ini SEC-FILETOKENS-CANCEL-0008-001
345 RUN_TEST_STEP -1 CTestHandler listprotectedobjects cancel.ini SEC-FILETOKENS-CANCEL-0008-002
347 RUN_TEST_STEP -1 CTestHandler changepassphrase cancel.ini SEC-FILETOKENS-CANCEL-0008-003
349 RUN_TEST_STEP -1 CTestHandler settimeout cancel.ini SEC-FILETOKENS-CANCEL-0008-004
351 RUN_TEST_STEP -1 CTestHandler gettimeout cancel.ini SEC-FILETOKENS-CANCEL-0008-005
353 RUN_TEST_STEP -1 CTestHandler authopen cancel.ini SEC-FILETOKENS-CANCEL-0008-006
355 RUN_TEST_STEP -1 CTestHandler timeremaining cancel.ini SEC-FILETOKENS-CANCEL-0008-007
357 RUN_TEST_STEP -1 CTestHandler authclose cancel.ini SEC-FILETOKENS-CANCEL-0008-008
359 RUN_TEST_STEP -1 CTestHandler deletekeys cancel.ini SEC-FILETOKENS-CANCEL-0008-009
361 END_TESTCASE SEC-FILETOKENS-CANCEL-0008
367 START_TESTCASE SEC-FILETOKENS-CANCEL-0009
369 //! @SYMTestCaseID SEC-FILETOKENS-CANCEL-0009
371 //! @SYMTestCaseDesc End of testing
373 //! @SYMTestActions 1) 29,Closing key store
377 //! 3) 999.2, Sleep 5 seconds
379 //! 4) 999.3, Check for server heap error
381 RUN_TEST_STEP -1 CTestHandler delete
383 RUN_TEST_STEP -1 CTestHandler stopcancellation
385 RUN_TEST_STEP -1 CTestHandler sleep cancel.ini SEC-FILETOKENS-CANCEL-0009-003
387 RUN_TEST_STEP -1 CTestHandler checkserverheaperror
389 END_TESTCASE SEC-FILETOKENS-CANCEL-0009