os/security/cryptoservices/filebasedcertificateandkeystores/test/ttesttools/scripts/keytool_migrate.script
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     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 //! @file
    17 // filetokens tools unit (integration) tests
    18 PRINT Run  test for migrating old keys data to new format.
    19 LOAD_SUITE ttesttools
    20 
    21 //! @SYMTestCaseID 		SEC-FILETOKENS-DEF136406-0001
    22 //! @SYMTestCaseDesc 	Migrate the old keys.dat to the new format
    23 //! @SYMTestPriority	Medium
    24 //! @SYMTestActions  	Call keytool to migrate key store from old to new format.
    25 //! @SYMTestExpectedResults Keystore would be successfully migrated.
    26 //! @SYMDevelopedForRelease Diran
    27 
    28 START_TESTCASE SEC-FILETOKENS-DEF136406-0001
    29 RUN_PROGRAM keytool.exe c:\ttesttools\data\key_migrate.txt c:\output.txt
    30 RUN_TEST_STEP 100 ttesttools ListKeyStep c:\ttesttools\scripts\keytool_migrate.ini keytool_list_migrated_keys
    31 END_TESTCASE SEC-FILETOKENS-DEF136406-0001
    32 
    33 //! @SYMTestCaseID 		SEC-FILETOKENS-DEF136406-0002
    34 //! @SYMTestCaseDesc 	Migrate the old keys.dat to the new format using default parameters
    35 //! @SYMTestPriority	Medium
    36 //! @SYMTestActions  	Call keytool to migrate key store from old to new format.
    37 //! @SYMTestExpectedResults Keystore would be successfully migrated.
    38 //! @SYMDevelopedForRelease Diran
    39 
    40 START_TESTCASE SEC-FILETOKENS-DEF136406-0002
    41 RUN_PROGRAM keytool.exe c:\ttesttools\data\key_migrate_default.txt c:\output.txt
    42 RUN_TEST_STEP 100 ttesttools CheckFile c:\ttesttools\scripts\keytool_migrate.ini keytool_migrate_default
    43 END_TESTCASE SEC-FILETOKENS-DEF136406-0002
    44 
    45 //! @SYMTestCaseID 		SEC-FILETOKENS-DEF136406-0003
    46 //! @SYMTestCaseDesc 	keytool check for mandatory parameter, name of the key file to be migrated
    47 //! @SYMTestPriority	Medium
    48 //! @SYMTestActions  	Call keytool to display message that mandatory param is missing.
    49 //! @SYMTestExpectedResults mandatory param missing message displayed alongwith the usage.
    50 //! @SYMDevelopedForRelease Diran
    51 
    52 START_TESTCASE SEC-FILETOKENS-DEF136406-0003
    53 RUN_PROGRAM keytool.exe c:\ttesttools\data\key_migrated_param_missing1.txt c:\output.txt
    54 RUN_TEST_STEP 100 ttesttools ParseFileStep c:\ttesttools\scripts\keytool_migrate.ini keytool_migrated_param_missing1
    55 END_TESTCASE SEC-FILETOKENS-DEF136406-0003
    56 
    57 //! @SYMTestCaseID 		SEC-FILETOKENS-DEF136406-0004
    58 //! @SYMTestCaseDesc 	keytool check for mandatory parameter, passphrase required for old key store
    59 //! @SYMTestPriority	Medium
    60 //! @SYMTestActions  	Call keytool to display message that mandatory param is missing.
    61 //! @SYMTestExpectedResults mandatory param missing message displayed alongwith the usage.
    62 //! @SYMDevelopedForRelease Diran
    63 
    64 START_TESTCASE SEC-FILETOKENS-DEF136406-0004
    65 RUN_PROGRAM keytool.exe c:\ttesttools\data\key_migrated_param_missing2.txt c:\output.txt
    66 RUN_TEST_STEP 100 ttesttools ParseFileStep c:\ttesttools\scripts\keytool_migrate.ini keytool_migrated_param_missing2
    67 END_TESTCASE SEC-FILETOKENS-DEF136406-0004
    68 
    69 //! @SYMTestCaseID 		SEC-FILETOKENS-DEF136406-0005
    70 //! @SYMTestCaseDesc 	keytool check for detail help for migration
    71 //! @SYMTestPriority	Medium
    72 //! @SYMTestActions  	Call keytool to display detail help message.
    73 //! @SYMTestExpectedResults Displays detail help message for migration of old store.
    74 //! @SYMDevelopedForRelease Diran
    75 
    76 START_TESTCASE SEC-FILETOKENS-DEF136406-0005
    77 RUN_PROGRAM keytool.exe c:\ttesttools\data\key_migrated_help.txt c:\output.txt
    78 RUN_TEST_STEP 100 ttesttools ParseFileStep c:\ttesttools\scripts\keytool_migrate.ini keytool_migrated_help
    79 END_TESTCASE SEC-FILETOKENS-DEF136406-0005