os/security/cryptoservices/filebasedcertificateandkeystores/test/tkeystore/scripts/cancel.script
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 //
     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".
     8 //
     9 // Initial Contributors:
    10 // Nokia Corporation - initial contribution.
    11 //
    12 // Contributors:
    13 //
    14 // Description: 
    15 //
    16 
    17 START_TESTCASE                SEC-FILETOKENS-CANCEL-0001
    18 
    19 //! @SYMTestCaseID            SEC-FILETOKENS-CANCEL-0001
    20 
    21 //! @SYMTestCaseDesc          
    22 
    23 //! @SYMTestActions           1) 1, Delete keystore data file
    24 
    25 //!                           2) None
    26 
    27 RUN_TEST_STEP                 -1    CTestHandler        deletekeystoredata  
    28 
    29 RUN_TEST_STEP                 -1    CTestHandler        startcancellation   
    30 
    31 END_TESTCASE                  SEC-FILETOKENS-CANCEL-0001
    32 
    33 
    34 
    35 
    36 
    37 START_TESTCASE                SEC-FILETOKENS-CANCEL-0002
    38 
    39 //! @SYMTestCaseID            SEC-FILETOKENS-CANCEL-0002
    40 
    41 //! @SYMTestCaseDesc          Start of testing
    42 
    43 //! @SYMTestActions           1) 1.2,Opening key store in manager mode
    44 
    45 //!                           2) 1.2.0.1 NOT A TEST Delete everything
    46 
    47 //!                           3) 2,Add a key
    48 
    49 RUN_TEST_STEP                 -1    CTestHandler        init                   cancel.ini   SEC-FILETOKENS-CANCEL-0002-001
    50 
    51 RUN_TEST_STEP                 -1    CTestHandler        deletekeys          
    52 
    53 RUN_TEST_STEP                 -1    CTestHandler        addkey                 cancel.ini   SEC-FILETOKENS-CANCEL-0002-003
    54 
    55 END_TESTCASE                  SEC-FILETOKENS-CANCEL-0002
    56 
    57 
    58 
    59 
    60 
    61 START_TESTCASE                SEC-FILETOKENS-CANCEL-0003
    62 
    63 //! @SYMTestCaseID            SEC-FILETOKENS-CANCEL-0003
    64 
    65 //! @SYMTestCaseDesc          /////////////////////////////////////////////////////////////////////////////
    66 
    67 //!                           Test case 3: List the keys, should only find "Banana"
    68 
    69 //!                           /////////////////////////////////////////////////////////////////////////////
    70 
    71 //! @SYMTestActions           1) 3 List everything
    72 
    73 //!                           2) 3.1,Get it again
    74 
    75 //!                           3) 3.3.1,Set passphrase timeout to "don't cache"
    76 
    77 //!                           4) 3.2,Open it
    78 
    79 //!                           5) 3.3,Open a banana for decrypt
    80 
    81 //!                           6) 3.4, Sign with a banana, 20 char text
    82 
    83 //!                           7) 3.5, Sign digest with a banana
    84 
    85 //!                           8) 3.6, Decrypt with a banana
    86 
    87 RUN_TEST_STEP                 -1    CTestHandler        listkeys               cancel.ini   SEC-FILETOKENS-CANCEL-0003-001
    88 
    89 RUN_TEST_STEP                 -1    CTestHandler        getkeyinfo             cancel.ini   SEC-FILETOKENS-CANCEL-0003-002
    90 
    91 RUN_TEST_STEP                 -1    CTestHandler        settimeout             cancel.ini   SEC-FILETOKENS-CANCEL-0003-003
    92 
    93 RUN_TEST_STEP                 -1    CTestHandler        open                   cancel.ini   SEC-FILETOKENS-CANCEL-0003-004
    94 
    95 RUN_TEST_STEP                 -1    CTestHandler        open                   cancel.ini   SEC-FILETOKENS-CANCEL-0003-005
    96 
    97 RUN_TEST_STEP                 -1    CTestHandler        sign                   cancel.ini   SEC-FILETOKENS-CANCEL-0003-006
    98 
    99 RUN_TEST_STEP                 -1    CTestHandler        sign                   cancel.ini   SEC-FILETOKENS-CANCEL-0003-007
   100 
   101 RUN_TEST_STEP                 -1    CTestHandler        decrypt                cancel.ini   SEC-FILETOKENS-CANCEL-0003-008
   102 
   103 END_TESTCASE                  SEC-FILETOKENS-CANCEL-0003
   104 
   105 
   106 
   107 
   108 
   109 START_TESTCASE                SEC-FILETOKENS-CANCEL-0004
   110 
   111 //! @SYMTestCaseID            SEC-FILETOKENS-CANCEL-0004
   112 
   113 //! @SYMTestCaseDesc          /////////////////////////////////////////////////////////////////////////////
   114 
   115 //!                           Test case 4: Delete "Banana" key
   116 
   117 //!                           /////////////////////////////////////////////////////////////////////////////
   118 
   119 //! @SYMTestActions           1) 4. Delete the key
   120 
   121 RUN_TEST_STEP                 -1    CTestHandler        deletekeys             cancel.ini   SEC-FILETOKENS-CANCEL-0004-001
   122 
   123 END_TESTCASE                  SEC-FILETOKENS-CANCEL-0004
   124 
   125 
   126 
   127 
   128 
   129 START_TESTCASE                SEC-FILETOKENS-CANCEL-0005
   130 
   131 //! @SYMTestCaseID            SEC-FILETOKENS-CANCEL-0005
   132 
   133 //! @SYMTestCaseDesc          /////////////////////////////////////////////////////////////////////////////
   134 
   135 //!                           Test case 5: List the keys, should find nothing
   136 
   137 //!                           /////////////////////////////////////////////////////////////////////////////
   138 
   139 //! @SYMTestActions           1) 5 List everything
   140 
   141 //!                           2) 6,Add a larger key
   142 
   143 //!                           3) 7,Add a key with a very long label
   144 
   145 //!                           4) 8,Get that key again
   146 
   147 //!                           5) 9,Open that key again
   148 
   149 //!                           6) 1.1.5.6,Add a key
   150 
   151 //!                           7) 1.1.5.6.1, Sign with a carrot, 20 char text
   152 
   153 //!                           8) 1.1.5.7,Add a key
   154 
   155 //!                           9) 1.1.5.7.1,Open it
   156 
   157 //!                           10) 1.1.5.7.2, Test derive
   158 
   159 //!                           11) 10,Add a key with illegal usage
   160 
   161 //!                           12) 11,Add a key with illegal usage
   162 
   163 //!                           13) 12,Add a key with illegal usage
   164 
   165 //!                           14) 13 List everything (including illegal usage keys)
   166 
   167 //!                           15) 14 List DSA keys (including illegal usage keys)
   168 
   169 //!                           16) 15 List Sign-usage keys (including illegal usage keys)
   170 
   171 //!                           17) 16 List 'All usages' keys (including illegal usage keys)
   172 
   173 //!                           18) 17, Delete RSA keys
   174 
   175 //!                           19) 18 List RSA keys
   176 
   177 //!                           20) 19 List everything (including illegal usage keys)
   178 
   179 //!                           21) 20,Add a key that was previously deleted
   180 
   181 //!                           22) 21 List RSA keys
   182 
   183 //!                           23) 22 List everything (including illegal usage keys)
   184 
   185 //!                           24) 23, Delete it again
   186 
   187 //!                           25) 24, Delete everything
   188 
   189 //!                           26) 25 List everything
   190 
   191 RUN_TEST_STEP                 -1    CTestHandler        listkeys               cancel.ini   SEC-FILETOKENS-CANCEL-0005-001
   192 
   193 RUN_TEST_STEP                 -1    CTestHandler        addkey                 cancel.ini   SEC-FILETOKENS-CANCEL-0005-002
   194 
   195 RUN_TEST_STEP                 -1    CTestHandler        addkey                 cancel.ini   SEC-FILETOKENS-CANCEL-0005-003
   196 
   197 RUN_TEST_STEP                 -1    CTestHandler        getkeyinfo             cancel.ini   SEC-FILETOKENS-CANCEL-0005-004
   198 
   199 RUN_TEST_STEP                 -1    CTestHandler        open                   cancel.ini   SEC-FILETOKENS-CANCEL-0005-005
   200 
   201 RUN_TEST_STEP                 -1    CTestHandler        addkey                 cancel.ini   SEC-FILETOKENS-CANCEL-0005-006
   202 
   203 RUN_TEST_STEP                 -1    CTestHandler        sign                   cancel.ini   SEC-FILETOKENS-CANCEL-0005-007
   204 
   205 RUN_TEST_STEP                 -1    CTestHandler        addkey                 cancel.ini   SEC-FILETOKENS-CANCEL-0005-008
   206 
   207 RUN_TEST_STEP                 -1    CTestHandler        open                   cancel.ini   SEC-FILETOKENS-CANCEL-0005-009
   208 
   209 RUN_TEST_STEP                 -1    CTestHandler        derive                 cancel.ini   SEC-FILETOKENS-CANCEL-0005-010
   210 
   211 RUN_TEST_STEP                 -1    CTestHandler        addkey                 cancel.ini   SEC-FILETOKENS-CANCEL-0005-011
   212 
   213 RUN_TEST_STEP                 -1    CTestHandler        addkey                 cancel.ini   SEC-FILETOKENS-CANCEL-0005-012
   214 
   215 RUN_TEST_STEP                 -1    CTestHandler        addkey                 cancel.ini   SEC-FILETOKENS-CANCEL-0005-013
   216 
   217 RUN_TEST_STEP                 -1    CTestHandler        listkeys               cancel.ini   SEC-FILETOKENS-CANCEL-0005-014
   218 
   219 RUN_TEST_STEP                 -1    CTestHandler        listkeys               cancel.ini   SEC-FILETOKENS-CANCEL-0005-015
   220 
   221 RUN_TEST_STEP                 -1    CTestHandler        listkeys               cancel.ini   SEC-FILETOKENS-CANCEL-0005-016
   222 
   223 RUN_TEST_STEP                 -1    CTestHandler        listkeys               cancel.ini   SEC-FILETOKENS-CANCEL-0005-017
   224 
   225 RUN_TEST_STEP                 -1    CTestHandler        deletekeys             cancel.ini   SEC-FILETOKENS-CANCEL-0005-018
   226 
   227 RUN_TEST_STEP                 -1    CTestHandler        listkeys               cancel.ini   SEC-FILETOKENS-CANCEL-0005-019
   228 
   229 RUN_TEST_STEP                 -1    CTestHandler        listkeys               cancel.ini   SEC-FILETOKENS-CANCEL-0005-020
   230 
   231 RUN_TEST_STEP                 -1    CTestHandler        addkey                 cancel.ini   SEC-FILETOKENS-CANCEL-0005-021
   232 
   233 RUN_TEST_STEP                 -1    CTestHandler        listkeys               cancel.ini   SEC-FILETOKENS-CANCEL-0005-022
   234 
   235 RUN_TEST_STEP                 -1    CTestHandler        listkeys               cancel.ini   SEC-FILETOKENS-CANCEL-0005-023
   236 
   237 RUN_TEST_STEP                 -1    CTestHandler        deletekeys             cancel.ini   SEC-FILETOKENS-CANCEL-0005-024
   238 
   239 RUN_TEST_STEP                 -1    CTestHandler        deletekeys             cancel.ini   SEC-FILETOKENS-CANCEL-0005-025
   240 
   241 RUN_TEST_STEP                 -1    CTestHandler        listkeys               cancel.ini   SEC-FILETOKENS-CANCEL-0005-026
   242 
   243 END_TESTCASE                  SEC-FILETOKENS-CANCEL-0005
   244 
   245 
   246 
   247 
   248 
   249 START_TESTCASE                SEC-FILETOKENS-CANCEL-0006
   250 
   251 //! @SYMTestCaseID            SEC-FILETOKENS-CANCEL-0006
   252 
   253 //! @SYMTestCaseDesc          Test importing keys
   254 
   255 //! @SYMTestActions           1) 26, Import a PKCS5 encrypted DSA key
   256 
   257 //!                           2) 27, List DSA keys (TEST ID: GT0140-KEY001)
   258 
   259 //!                           3) 28, Delete everything
   260 
   261 RUN_TEST_STEP                 -1    CTestHandler        importkey              cancel.ini   SEC-FILETOKENS-CANCEL-0006-001
   262 
   263 RUN_TEST_STEP                 -1    CTestHandler        listkeys               cancel.ini   SEC-FILETOKENS-CANCEL-0006-002
   264 
   265 RUN_TEST_STEP                 -1    CTestHandler        deletekeys             cancel.ini   SEC-FILETOKENS-CANCEL-0006-003
   266 
   267 END_TESTCASE                  SEC-FILETOKENS-CANCEL-0006
   268 
   269 
   270 
   271 
   272 
   273 START_TESTCASE                SEC-FILETOKENS-CANCEL-0007
   274 
   275 //! @SYMTestCaseID            SEC-FILETOKENS-CANCEL-0007
   276 
   277 //! @SYMTestCaseDesc          Test export
   278 
   279 //! @SYMTestActions           1) 1.1.1 Import a RSA key
   280 
   281 //!                           2) 1.1.0.1, Set passphrase timeout to "don't cache"
   282 
   283 //!                           3) 1.1.5 Export a RSA key
   284 
   285 //!                           4) 1.4.1 Import a DSA key
   286 
   287 //!                           5) 1.4.6 Export a DSA key
   288 
   289 //!                           6) 1.7.6 Export a RSA key in encrypted format
   290 
   291 //!                           7) 1.9.6 Export a DSA key in encrypted format
   292 
   293 //!                           8) 1.10.0 NOT A TEST Delete everything 
   294 
   295                     ** Basic sanity check for PKCS8 encrypted DSA key import/export **
   296 
   297 RUN_TEST_STEP                 -1    CTestHandler        importkey              cancel.ini   SEC-FILETOKENS-CANCEL-0007-001
   298 
   299 RUN_TEST_STEP                 -1    CTestHandler        settimeout             cancel.ini   SEC-FILETOKENS-CANCEL-0007-002
   300 
   301 RUN_TEST_STEP                 -1    CTestHandler        exportkey              cancel.ini   SEC-FILETOKENS-CANCEL-0007-003
   302 
   303 RUN_TEST_STEP                 -1    CTestHandler        importkey              cancel.ini   SEC-FILETOKENS-CANCEL-0007-004
   304 
   305 RUN_TEST_STEP                 -1    CTestHandler        exportkey              cancel.ini   SEC-FILETOKENS-CANCEL-0007-005
   306 
   307 RUN_TEST_STEP                 -1    CTestHandler        exportkey              cancel.ini   SEC-FILETOKENS-CANCEL-0007-006
   308 
   309 RUN_TEST_STEP                 -1    CTestHandler        exportkey              cancel.ini   SEC-FILETOKENS-CANCEL-0007-007
   310 
   311 RUN_TEST_STEP                 -1    CTestHandler        deletekeys          
   312 
   313 END_TESTCASE                  SEC-FILETOKENS-CANCEL-0007
   314 
   315 
   316 
   317 
   318 
   319 START_TESTCASE                SEC-FILETOKENS-CANCEL-0008
   320 
   321 //! @SYMTestCaseID            SEC-FILETOKENS-CANCEL-0008
   322 
   323 //! @SYMTestCaseDesc          Test authentication objects (snippets of authobjects.txt)
   324 
   325 //! @SYMTestActions           1) 2.1, Add a key
   326 
   327 //!                           2) 2.2, List protected objects
   328 
   329 //!                           3) 3.5, Change the passphrase
   330 
   331 //!                           4) 0.7.2, Set passphrase timeout to 15 seconds
   332 
   333 //!                           5) 1.1.2, Get timeout, expect 15 seconds
   334 
   335 //!                           6) 1.4.1.5, Open banana
   336 
   337 //!                           7) 1.3.1, Get time remaining, expect 15 seconds
   338 
   339 //!                           8) 1.4.2.2, Close object
   340 
   341 //!                           9) 3.8, Delete everything
   342 
   343 RUN_TEST_STEP                 -1    CTestHandler        addkey                 cancel.ini   SEC-FILETOKENS-CANCEL-0008-001
   344 
   345 RUN_TEST_STEP                 -1    CTestHandler        listprotectedobjects   cancel.ini   SEC-FILETOKENS-CANCEL-0008-002
   346 
   347 RUN_TEST_STEP                 -1    CTestHandler        changepassphrase       cancel.ini   SEC-FILETOKENS-CANCEL-0008-003
   348 
   349 RUN_TEST_STEP                 -1    CTestHandler        settimeout             cancel.ini   SEC-FILETOKENS-CANCEL-0008-004
   350 
   351 RUN_TEST_STEP                 -1    CTestHandler        gettimeout             cancel.ini   SEC-FILETOKENS-CANCEL-0008-005
   352 
   353 RUN_TEST_STEP                 -1    CTestHandler        authopen               cancel.ini   SEC-FILETOKENS-CANCEL-0008-006
   354 
   355 RUN_TEST_STEP                 -1    CTestHandler        timeremaining          cancel.ini   SEC-FILETOKENS-CANCEL-0008-007
   356 
   357 RUN_TEST_STEP                 -1    CTestHandler        authclose              cancel.ini   SEC-FILETOKENS-CANCEL-0008-008
   358 
   359 RUN_TEST_STEP                 -1    CTestHandler        deletekeys             cancel.ini   SEC-FILETOKENS-CANCEL-0008-009
   360 
   361 END_TESTCASE                  SEC-FILETOKENS-CANCEL-0008
   362 
   363 
   364 
   365 
   366 
   367 START_TESTCASE                SEC-FILETOKENS-CANCEL-0009
   368 
   369 //! @SYMTestCaseID            SEC-FILETOKENS-CANCEL-0009
   370 
   371 //! @SYMTestCaseDesc          End of testing
   372 
   373 //! @SYMTestActions           1) 29,Closing key store
   374 
   375 //!                           2) 999.1
   376 
   377 //!                           3) 999.2, Sleep 5 seconds
   378 
   379 //!                           4) 999.3, Check for server heap error
   380 
   381 RUN_TEST_STEP                 -1    CTestHandler        delete              
   382 
   383 RUN_TEST_STEP                 -1    CTestHandler        stopcancellation    
   384 
   385 RUN_TEST_STEP                 -1    CTestHandler        sleep                  cancel.ini   SEC-FILETOKENS-CANCEL-0009-003
   386 
   387 RUN_TEST_STEP                 -1    CTestHandler        checkserverheaperror
   388 
   389 END_TESTCASE                  SEC-FILETOKENS-CANCEL-0009
   390 
   391 
   392 
   393 
   394