os/security/cryptoservices/filebasedcertificateandkeystores/test/tkeystore/scripts/servoom.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-SERVOOM-0001
    18 
    19 //! @SYMTestCaseID            SEC-FILETOKENS-SERVOOM-0001
    20 
    21 //! @SYMTestCaseDesc          
    22 
    23 //!                           Keystore server OOM tests
    24 
    25 //!                           
    26 
    27 //!                           Testing key generatation has been diabled for the moment.
    28 
    29 //!                           
    30 
    31 //!                           
    32 
    33 //!                           /////////////////////////////////////////////////////////////////////////////
    34 
    35 //!                           Test case 1: Initialise the store
    36 
    37 //!                           /////////////////////////////////////////////////////////////////////////////
    38 
    39 //! @SYMTestActions           1) Delete keystore data file
    40 
    41 //!                           2) Start server OOM testing
    42 
    43 //!                           3) 1,Opening key store in manager mode
    44 
    45 //!                           4) 1.0.1 NOT A TEST Delete everything
    46 
    47 RUN_TEST_STEP                 -1    CTestHandler        deletekeystoredata  
    48 
    49 RUN_TEST_STEP                 -1    CTestHandler        startserveroom      
    50 
    51 RUN_TEST_STEP                 -1    CTestHandler        init                   servoom.ini   SEC-FILETOKENS-SERVOOM-0001-003
    52 
    53 RUN_TEST_STEP                 -1    CTestHandler        deletekeys          
    54 
    55 END_TESTCASE                  SEC-FILETOKENS-SERVOOM-0001
    56 
    57 
    58 
    59 
    60 
    61 START_TESTCASE                SEC-FILETOKENS-SERVOOM-0002
    62 
    63 //! @SYMTestCaseID            SEC-FILETOKENS-SERVOOM-0002
    64 
    65 //! @SYMTestCaseDesc          /////////////////////////////////////////////////////////////////////////////
    66 
    67 //!                           Test case 2: Add the "Banana" key
    68 
    69 //!                           /////////////////////////////////////////////////////////////////////////////
    70 
    71 //! @SYMTestActions           1) 2,Add a key
    72 
    73 //!                           2) 2.1,Set passphrase timeout to "don't cache"
    74 
    75 RUN_TEST_STEP                 -1    CTestHandler        addkey                 servoom.ini   SEC-FILETOKENS-SERVOOM-0002-001
    76 
    77 RUN_TEST_STEP                 -1    CTestHandler        settimeout             servoom.ini   SEC-FILETOKENS-SERVOOM-0002-002
    78 
    79 END_TESTCASE                  SEC-FILETOKENS-SERVOOM-0002
    80 
    81 
    82 
    83 
    84 
    85 START_TESTCASE                SEC-FILETOKENS-SERVOOM-0003
    86 
    87 //! @SYMTestCaseID            SEC-FILETOKENS-SERVOOM-0003
    88 
    89 //! @SYMTestCaseDesc          /////////////////////////////////////////////////////////////////////////////
    90 
    91 //!                           Test case 3: List the keys, should only find "Banana"
    92 
    93 //!                           /////////////////////////////////////////////////////////////////////////////
    94 
    95 //! @SYMTestActions           1) 3 List everything
    96 
    97 RUN_TEST_STEP                 -1    CTestHandler        listkeys               servoom.ini   SEC-FILETOKENS-SERVOOM-0003-001
    98 
    99 END_TESTCASE                  SEC-FILETOKENS-SERVOOM-0003
   100 
   101 
   102 
   103 
   104 
   105 START_TESTCASE                SEC-FILETOKENS-SERVOOM-0004
   106 
   107 //! @SYMTestCaseID            SEC-FILETOKENS-SERVOOM-0004
   108 
   109 //! @SYMTestCaseDesc          /////////////////////////////////////////////////////////////////////////////
   110 
   111 //!                           Test case 4: Delete "Banana" key
   112 
   113 //!                           /////////////////////////////////////////////////////////////////////////////
   114 
   115 //! @SYMTestActions           1) 4. Delete the key
   116 
   117 RUN_TEST_STEP                 -1    CTestHandler        deletekeys             servoom.ini   SEC-FILETOKENS-SERVOOM-0004-001
   118 
   119 END_TESTCASE                  SEC-FILETOKENS-SERVOOM-0004
   120 
   121 
   122 
   123 
   124 
   125 START_TESTCASE                SEC-FILETOKENS-SERVOOM-0005
   126 
   127 //! @SYMTestCaseID            SEC-FILETOKENS-SERVOOM-0005
   128 
   129 //! @SYMTestCaseDesc          /////////////////////////////////////////////////////////////////////////////
   130 
   131 //!                           Test case 5: List the keys, should find nothing
   132 
   133 //!                           /////////////////////////////////////////////////////////////////////////////
   134 
   135 //! @SYMTestActions           1) 3 List everything
   136 
   137 //!                           2) 2,Add a larger key
   138 
   139 //!                           3) 1.1.5.4,Add a key with a very long label
   140 
   141 //!                           4) 1.1.5.6,Add a DSA key
   142 
   143 //!                           5) 1.1.5.7,Add a DH key
   144 
   145 //!                           6) 1.1.5.7.1,Open it
   146 
   147 //!                           7) 1.1.5.7.2, Test derive
   148 
   149 //!                           8) 1.1.6,Add a key with illegal usage
   150 
   151 //!                           9) 1.1.7,Add a key with illegal usage
   152 
   153 //!                           10) 1.1.8,Add a key with illegal usage
   154 
   155 //!                           11) 1.2 List everything (including illegal usage keys)
   156 
   157 //!                           12) 1.3.1 List DSA keys (including illegal usage keys)
   158 
   159 //!                           13) 1.3.2 List Sign-usage keys (including illegal usage keys)
   160 
   161 //!                           14) 1.3.3 List 'All usages' keys (including illegal usage keys)
   162 
   163 //!                           15) 1.4.1, Delete RSA keys
   164 
   165 //!                           16) 1.4.2 List RSA keys
   166 
   167 //!                           17) 1.4.3 List everything (including illegal usage keys)
   168 
   169 //!                           18) 1.4.4,Add a key that was previously deleted
   170 
   171 //!                           19) 1.4.5 List RSA keys (including illegal usage keys)
   172 
   173 //!                           20) 1.4.6 List everything (including illegal usage keys)
   174 
   175 RUN_TEST_STEP                 -1    CTestHandler        listkeys               servoom.ini   SEC-FILETOKENS-SERVOOM-0005-001
   176 
   177 RUN_TEST_STEP                 -1    CTestHandler        addkey                 servoom.ini   SEC-FILETOKENS-SERVOOM-0005-002
   178 
   179 RUN_TEST_STEP                 -1    CTestHandler        addkey                 servoom.ini   SEC-FILETOKENS-SERVOOM-0005-003
   180 
   181 RUN_TEST_STEP                 -1    CTestHandler        addkey                 servoom.ini   SEC-FILETOKENS-SERVOOM-0005-004
   182 
   183 RUN_TEST_STEP                 -1    CTestHandler        addkey                 servoom.ini   SEC-FILETOKENS-SERVOOM-0005-005
   184 
   185 RUN_TEST_STEP                 -1    CTestHandler        open                   servoom.ini   SEC-FILETOKENS-SERVOOM-0005-006
   186 
   187 RUN_TEST_STEP                 -1    CTestHandler        derive                 servoom.ini   SEC-FILETOKENS-SERVOOM-0005-007
   188 
   189 RUN_TEST_STEP                 -1    CTestHandler        addkey                 servoom.ini   SEC-FILETOKENS-SERVOOM-0005-008
   190 
   191 RUN_TEST_STEP                 -1    CTestHandler        addkey                 servoom.ini   SEC-FILETOKENS-SERVOOM-0005-009
   192 
   193 RUN_TEST_STEP                 -1    CTestHandler        addkey                 servoom.ini   SEC-FILETOKENS-SERVOOM-0005-010
   194 
   195 RUN_TEST_STEP                 -1    CTestHandler        listkeys               servoom.ini   SEC-FILETOKENS-SERVOOM-0005-011
   196 
   197 RUN_TEST_STEP                 -1    CTestHandler        listkeys               servoom.ini   SEC-FILETOKENS-SERVOOM-0005-012
   198 
   199 RUN_TEST_STEP                 -1    CTestHandler        listkeys               servoom.ini   SEC-FILETOKENS-SERVOOM-0005-013
   200 
   201 RUN_TEST_STEP                 -1    CTestHandler        listkeys               servoom.ini   SEC-FILETOKENS-SERVOOM-0005-014
   202 
   203 RUN_TEST_STEP                 -1    CTestHandler        deletekeys             servoom.ini   SEC-FILETOKENS-SERVOOM-0005-015
   204 
   205 RUN_TEST_STEP                 -1    CTestHandler        listkeys               servoom.ini   SEC-FILETOKENS-SERVOOM-0005-016
   206 
   207 RUN_TEST_STEP                 -1    CTestHandler        listkeys               servoom.ini   SEC-FILETOKENS-SERVOOM-0005-017
   208 
   209 RUN_TEST_STEP                 -1    CTestHandler        addkey                 servoom.ini   SEC-FILETOKENS-SERVOOM-0005-018
   210 
   211 RUN_TEST_STEP                 -1    CTestHandler        listkeys               servoom.ini   SEC-FILETOKENS-SERVOOM-0005-019
   212 
   213 RUN_TEST_STEP                 -1    CTestHandler        listkeys               servoom.ini   SEC-FILETOKENS-SERVOOM-0005-020
   214 
   215 END_TESTCASE                  SEC-FILETOKENS-SERVOOM-0005
   216 
   217 
   218 
   219 
   220 
   221 START_TESTCASE                SEC-FILETOKENS-SERVOOM-0006
   222 
   223 //! @SYMTestCaseID            SEC-FILETOKENS-SERVOOM-0006
   224 
   225 //! @SYMTestCaseDesc          //////////////////////////////////////////////////////////////////////////////
   226 
   227 //!                           Test RSA signing
   228 
   229 //!                           //////////////////////////////////////////////////////////////////////////////
   230 
   231 //! @SYMTestActions           1) 1.0.0.2.1,Open it
   232 
   233 //!                           2) 1.0.0.2.2,Open a banana for decrypt
   234 
   235 //!                           3) Decrypt
   236 
   237 //!                           4) 1.0.0.2.2.1, Sign with a banana, 20 char text
   238 
   239 //!                           5) 1.0.0.2.2.2, Sign with a banana, 32 char text
   240 
   241 //!                           6) 1.0.0.2.2.2.1, Sign digest with a banana
   242 
   243 //!                           7) 1.4.5, Delete it again
   244 
   245 RUN_TEST_STEP                 -1    CTestHandler        open                   servoom.ini   SEC-FILETOKENS-SERVOOM-0006-001
   246 
   247 RUN_TEST_STEP                 -1    CTestHandler        open                   servoom.ini   SEC-FILETOKENS-SERVOOM-0006-002
   248 
   249 RUN_TEST_STEP                 -1    CTestHandler        decrypt                servoom.ini   SEC-FILETOKENS-SERVOOM-0006-003
   250 
   251 RUN_TEST_STEP                 -1    CTestHandler        sign                   servoom.ini   SEC-FILETOKENS-SERVOOM-0006-004
   252 
   253 RUN_TEST_STEP                 -1    CTestHandler        sign                   servoom.ini   SEC-FILETOKENS-SERVOOM-0006-005
   254 
   255 RUN_TEST_STEP                 -1    CTestHandler        sign                   servoom.ini   SEC-FILETOKENS-SERVOOM-0006-006
   256 
   257 RUN_TEST_STEP                 -1    CTestHandler        deletekeys             servoom.ini   SEC-FILETOKENS-SERVOOM-0006-007
   258 
   259 END_TESTCASE                  SEC-FILETOKENS-SERVOOM-0006
   260 
   261 
   262 
   263 
   264 
   265 START_TESTCASE                SEC-FILETOKENS-SERVOOM-0007
   266 
   267 //! @SYMTestCaseID            SEC-FILETOKENS-SERVOOM-0007
   268 
   269 //! @SYMTestCaseDesc          //////////////////////////////////////////////////////////////////////////////
   270 
   271 //!                           Test DSA signing
   272 
   273 //!                           //////////////////////////////////////////////////////////////////////////////
   274 
   275 //! @SYMTestActions           1) 1.0.0.10,Get carrot
   276 
   277 //!                           2) 1.0.0.10.1, Sign with a carrot, 20 char text
   278 
   279 //!                           3) 1.0.0.10.2, Sign with carrot, text too long (21 chars)
   280 
   281 //!                           4) 1.0.0.10.2, Sign digest with carrot
   282 
   283 //!                           5) 1.0.0.10.3, Sign digest with a carrot, fail hash
   284 
   285 //!                           6) 1.4.5, Delete it again
   286 
   287 //!                           7) 1.5.8.1 List everything (including illegal usage keys)
   288 
   289 //!                           8) 1.5.8.2, Delete everything
   290 
   291 //!                           9) 1.5.9 List everything
   292 
   293 RUN_TEST_STEP                 -1    CTestHandler        getkeyinfo             servoom.ini   SEC-FILETOKENS-SERVOOM-0007-001
   294 
   295 RUN_TEST_STEP                 -1    CTestHandler        sign                   servoom.ini   SEC-FILETOKENS-SERVOOM-0007-002
   296 
   297 RUN_TEST_STEP !Error=-9       -1    CTestHandler        sign                   servoom.ini   SEC-FILETOKENS-SERVOOM-0007-003
   298 
   299 RUN_TEST_STEP                 -1    CTestHandler        sign                   servoom.ini   SEC-FILETOKENS-SERVOOM-0007-004
   300 
   301 RUN_TEST_STEP !Error=-2       -1    CTestHandler        sign                   servoom.ini   SEC-FILETOKENS-SERVOOM-0007-005
   302 
   303 RUN_TEST_STEP                 -1    CTestHandler        deletekeys             servoom.ini   SEC-FILETOKENS-SERVOOM-0007-006
   304 
   305 RUN_TEST_STEP                 -1    CTestHandler        listkeys               servoom.ini   SEC-FILETOKENS-SERVOOM-0007-007
   306 
   307 RUN_TEST_STEP                 -1    CTestHandler        deletekeys             servoom.ini   SEC-FILETOKENS-SERVOOM-0007-008
   308 
   309 RUN_TEST_STEP                 -1    CTestHandler        listkeys               servoom.ini   SEC-FILETOKENS-SERVOOM-0007-009
   310 
   311 END_TESTCASE                  SEC-FILETOKENS-SERVOOM-0007
   312 
   313 
   314 
   315 
   316 
   317 START_TESTCASE                SEC-FILETOKENS-SERVOOM-0008
   318 
   319 //! @SYMTestCaseID            SEC-FILETOKENS-SERVOOM-0008
   320 
   321 //! @SYMTestCaseDesc          Test importing keys
   322 
   323 //! @SYMTestActions           1) 26, Import a PKCS5 encrypted DSA key
   324 
   325 //!                           2) 27, List DSA keys (TEST ID: GT0140-KEY001)
   326 
   327 //!                           3) 28, Delete everything
   328 
   329 RUN_TEST_STEP                 -1    CTestHandler        importkey              servoom.ini   SEC-FILETOKENS-SERVOOM-0008-001
   330 
   331 RUN_TEST_STEP                 -1    CTestHandler        listkeys               servoom.ini   SEC-FILETOKENS-SERVOOM-0008-002
   332 
   333 RUN_TEST_STEP                 -1    CTestHandler        deletekeys             servoom.ini   SEC-FILETOKENS-SERVOOM-0008-003
   334 
   335 END_TESTCASE                  SEC-FILETOKENS-SERVOOM-0008
   336 
   337 
   338 
   339 
   340 
   341 START_TESTCASE                SEC-FILETOKENS-SERVOOM-0009
   342 
   343 //! @SYMTestCaseID            SEC-FILETOKENS-SERVOOM-0009
   344 
   345 //! @SYMTestCaseDesc          Test exporting keys
   346 
   347 //! @SYMTestActions           1) 1.1.0 Import a RSA key
   348 
   349 //!                           2) 1.1.0.1, Set passphrase timeout to "don't cache"
   350 
   351 //!                           3) 1.1.5 Export a RSA key
   352 
   353 //!                           4) 1.4.1 Import a DSA key
   354 
   355 //!                           5) 1.4.6 Export a DSA key
   356 
   357 //!                           6) 1.7.6 Export a RSA key in encrypted format
   358 
   359 //!                           7) 1.9.6 Export a DSA key in encrypted format
   360 
   361 //!                           8) 1.10.0 NOT A TEST Delete everything 
   362 
   363                     ** Basic sanity check for PKCS8 encrypted DSA key import/export **
   364 
   365 RUN_TEST_STEP                 -1    CTestHandler        importkey              servoom.ini   SEC-FILETOKENS-SERVOOM-0009-001
   366 
   367 RUN_TEST_STEP                 -1    CTestHandler        settimeout             servoom.ini   SEC-FILETOKENS-SERVOOM-0009-002
   368 
   369 RUN_TEST_STEP                 -1    CTestHandler        exportkey              servoom.ini   SEC-FILETOKENS-SERVOOM-0009-003
   370 
   371 RUN_TEST_STEP                 -1    CTestHandler        importkey              servoom.ini   SEC-FILETOKENS-SERVOOM-0009-004
   372 
   373 RUN_TEST_STEP                 -1    CTestHandler        exportkey              servoom.ini   SEC-FILETOKENS-SERVOOM-0009-005
   374 
   375 RUN_TEST_STEP                 -1    CTestHandler        exportkey              servoom.ini   SEC-FILETOKENS-SERVOOM-0009-006
   376 
   377 RUN_TEST_STEP                 -1    CTestHandler        exportkey              servoom.ini   SEC-FILETOKENS-SERVOOM-0009-007
   378 
   379 RUN_TEST_STEP                 -1    CTestHandler        deletekeys          
   380 
   381 END_TESTCASE                  SEC-FILETOKENS-SERVOOM-0009
   382 
   383 
   384 
   385 
   386 
   387 START_TESTCASE                SEC-FILETOKENS-SERVOOM-0010
   388 
   389 //! @SYMTestCaseID            SEC-FILETOKENS-SERVOOM-0010
   390 
   391 //! @SYMTestCaseDesc          Test authentication objects (snippets of authobjects.txt)
   392 
   393 //! @SYMTestActions           1) 2.1, Add a key
   394 
   395 //!                           2) 2.2, List protected objects
   396 
   397 //!                           3) 3.5, Change the passphrase
   398 
   399 //!                           4) 0.7.2, Set passphrase timeout to 15 seconds
   400 
   401 //!                           5) 1.1.2, Get timeout, expect 15 seconds
   402 
   403 //!                           6) 1.4.1.5, Open banana
   404 
   405 //!                           7) 1.3.1, Get time remaining, expect 15 seconds
   406 
   407 //!                           8) 1.4.2.2, Close object
   408 
   409 //!                           9) 3.8, Delete everything
   410 
   411 RUN_TEST_STEP                 -1    CTestHandler        addkey                 servoom.ini   SEC-FILETOKENS-SERVOOM-0010-001
   412 
   413 RUN_TEST_STEP                 -1    CTestHandler        listprotectedobjects   servoom.ini   SEC-FILETOKENS-SERVOOM-0010-002
   414 
   415 RUN_TEST_STEP                 -1    CTestHandler        changepassphrase       servoom.ini   SEC-FILETOKENS-SERVOOM-0010-003
   416 
   417 RUN_TEST_STEP                 -1    CTestHandler        settimeout             servoom.ini   SEC-FILETOKENS-SERVOOM-0010-004
   418 
   419 RUN_TEST_STEP                 -1    CTestHandler        gettimeout             servoom.ini   SEC-FILETOKENS-SERVOOM-0010-005
   420 
   421 RUN_TEST_STEP                 -1    CTestHandler        authopen               servoom.ini   SEC-FILETOKENS-SERVOOM-0010-006
   422 
   423 RUN_TEST_STEP                 -1    CTestHandler        timeremaining          servoom.ini   SEC-FILETOKENS-SERVOOM-0010-007
   424 
   425 RUN_TEST_STEP                 -1    CTestHandler        authclose              servoom.ini   SEC-FILETOKENS-SERVOOM-0010-008
   426 
   427 RUN_TEST_STEP                 -1    CTestHandler        deletekeys             servoom.ini   SEC-FILETOKENS-SERVOOM-0010-009
   428 
   429 END_TESTCASE                  SEC-FILETOKENS-SERVOOM-0010
   430 
   431 
   432 
   433 
   434 
   435 START_TESTCASE                SEC-FILETOKENS-SERVOOM-0011
   436 
   437 //! @SYMTestCaseID            SEC-FILETOKENS-SERVOOM-0011
   438 
   439 //! @SYMTestCaseDesc          End of testing
   440 
   441 //! @SYMTestActions           1) 999.1, Closing key store
   442 
   443 //!                           2) Stop server OOM testing
   444 
   445 //!                           3) 999.2, Sleep 5 seconds
   446 
   447 //!                           4) 999.3, Check for server heap error
   448 
   449 RUN_TEST_STEP                 -1    CTestHandler        delete              
   450 
   451 RUN_TEST_STEP                 -1    CTestHandler        stopserveroom       
   452 
   453 RUN_TEST_STEP                 -1    CTestHandler        sleep                  servoom.ini   SEC-FILETOKENS-SERVOOM-0011-003
   454 
   455 RUN_TEST_STEP                 -1    CTestHandler        checkserverheaperror
   456 
   457 END_TESTCASE                  SEC-FILETOKENS-SERVOOM-0011
   458 
   459 
   460 
   461 
   462