os/security/crypto/weakcryptospi/test/tcryptospi/scripts/te_plugincharstestcases_v2.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 
    17 PRINT Run all te_plugincharstestcases Suite Tests
    18 
    19 //
    20 LOAD_SUITE Te_CryptoSpi
    21 //
    22 
    23 RUN_PROGRAM cryptospisetup.exe 2
    24 
    25 //! @SYMTestCaseID          SEC-CRYPTOSPI-PLUGINCHAR-0002
    26 //! @SYMTestCaseDesc        PluginCharacteristics
    27 
    28 START_TESTCASE SEC-CRYPTOSPI-PLUGINCHAR-0002
    29 
    30 RUN_TEST_STEP 100 Te_CryptoSpi PluginCharsCommonStep c:\testdata\tcryptospi\configs\plugincharscommon.ini Main
    31 
    32 RUN_TEST_STEP 100 Te_CryptoSpi PluginCharsSymmetricCipherStep c:\testdata\tcryptospi\configs\plugincharssymmetriccipher.ini Main
    33 
    34 RUN_TEST_STEP 100 Te_CryptoSpi PluginCharsAsymmetricCipherStep c:\testdata\tcryptospi\configs\plugincharsasymmetriccipher.ini Main
    35 
    36 RUN_TEST_STEP 100 Te_CryptoSpi PluginCharsHashStep c:\testdata\tcryptospi\configs\plugincharshash.ini Main
    37 
    38 RUN_TEST_STEP 100 Te_CryptoSpi PluginCharsNewHashStep c:\testdata\tcryptospi\configs\plugin_chars_new_hash.ini Main
    39 
    40 RUN_TEST_STEP 100 Te_CryptoSpi PluginCharsRandomStep c:\testdata\tcryptospi\configs\plugincharsrandom.ini Main
    41 
    42 RUN_TEST_STEP 100 Te_CryptoSpi PluginCharsAsymSignStep c:\testdata\tcryptospi\configs\plugincharsasymsign.ini Main
    43 
    44 RUN_TEST_STEP 100 Te_CryptoSpi PluginCharsKeyAgreeStep c:\testdata\tcryptospi\configs\plugincharskeyagree.ini Main
    45 
    46 RUN_TEST_STEP 100 Te_CryptoSpi PluginCharsAsymKeyPairStep c:\testdata\tcryptospi\configs\plugincharsasymkeypair.ini Main
    47 
    48 RUN_TEST_STEP 100 Te_CryptoSpi PluginCharsExtendedStep c:\testdata\tcryptospi\configs\plugincharsextended.ini Main
    49 
    50 END_TESTCASE SEC-CRYPTOSPI-PLUGINCHAR-0002
    51 
    52 
    53 //! @SYMTestCaseID          SEC-CRYP003-CHAR-MAC-0001
    54 //! @SYMTestCaseDesc        Tests that all KAlgorithmCipherAesXcbcMac96 command and non-common
    55 //!                         characteristics can be retrieved from an implementation object 
    56 //!                         produced by the framework and that they successfully match the 
    57 //!                         corresponding expected values.
    58 //! @SYMREQ                 REQ10616, REQ10618
    59 //! @SYMTestPriority        High
    60 //! @SYMTestType            CIT
    61 //! @SYMTestStatus          Implemented
    62 //! @SYMTestExpectedResults  The call to the factory method should return KErrNone, successfully create
    63 //!                          the implementation object, the Algorithm ID characteristic should equal 
    64 //!                          KAlgorithmCipherAesXcbcMac96, and the value of characteristics
    65 //!                          match against their expected value. 
    66 
    67 START_TESTCASE SEC-CRYP003-CHAR-MAC-0001
    68 RUN_TEST_STEP 100 Te_CryptoSpi PluginCharsMacStep c:\testdata\tcryptospi\configs\plugincharsmac.ini MAC96
    69 END_TESTCASE SEC-CRYP003-CHAR-MAC-0001
    70 
    71 //! @SYMTestCaseID          SEC-CRYP003-CHAR-MAC-0003
    72 //! @SYMTestCaseDesc        Tests that all KAlgorithmCipherAesXcbcPrf128 command and non-common
    73 //!                         characteristics can be retrieved from an implementation object 
    74 //!                         produced by the framework and that they successfully match the 
    75 //!                         corresponding expected values.
    76 //! @SYMREQ                 REQ10620, REQ10621
    77 //! @SYMTestPriority        High
    78 //! @SYMTestType            CIT
    79 //! @SYMTestStatus          Implemented
    80 //! @SYMTestExpectedResults  The call to the factory method should return KErrNone, successfully create
    81 //!                          the implementation object, the Algorithm ID characteristic should equal 
    82 //!                          KAlgorithmCipherAesXcbcPrf128, and the value of characteristics
    83 //!                          match against their expected value. 
    84 
    85 START_TESTCASE SEC-CRYP003-CHAR-MAC-0003
    86 RUN_TEST_STEP 100 Te_CryptoSpi PluginCharsMacStep c:\testdata\tcryptospi\configs\plugincharsmac.ini PRF128
    87 END_TESTCASE SEC-CRYP003-CHAR-MAC-0003
    88 
    89 // Set up to pick up tplugin01.dll only, which does not contain KAlgorithmCipherAesXcbcPrf128 implementation
    90 RUN_PROGRAM cryptospisetup.exe 1
    91 
    92 //! @SYMTestCaseID          SEC-CRYP002-PLUGIN-MAC-0003
    93 //! @SYMTestCaseDesc        Tests that the selected software plug-in (tplugin01.dll) is loads when it is 
    94 //!                         specified exclusively in the plug-in configuration file, but when the missing
    95 //!                         implementation is called, the framework would return an error.
    96 //!                         (PluginFailTest)
    97 //! @SYMREQ                 REQ10616, REQ10618, REQ10620, REQ10621
    98 //! @SYMTestPriority        High
    99 //! @SYMTestType            CIT
   100 //! @SYMTestStatus          Implemented
   101 //! @SYMTestExpectedResults  The call to the factory method should return KErrNotFound, as the algorithm
   102 //!                          wasn't implemented.
   103 START_TESTCASE SEC-CRYP002-PLUGIN-MAC-0003
   104 RUN_TEST_STEP !Result=-5 100 Te_CryptoSpi PluginCharsMacStep c:\testdata\tcryptospi\configs\plugincharsmac.ini PRF128
   105 END_TESTCASE SEC-CRYP002-PLUGIN-MAC-0003
   106 
   107 RUN_PROGRAM cryptospisetup.exe
   108 
   109 PRINT Complete te_plugincharstestcases