os/security/crypto/weakcryptospi/test/tcryptospi/scripts/te_ruleselectiontestcases_v2.script
Update contrib.
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 PRINT Run all te_ruleselection Suite Tests
20 LOAD_SUITE Te_CryptoSpi
23 RUN_PROGRAM cryptospisetup.exe 3
25 //! @SYMTestCaseID SEC-CRYPTOSPI-RULE-0007
26 //! @SYMTestCaseDesc RuleSelection_Interface
28 START_TESTCASE SEC-CRYPTOSPI-RULE-0007
29 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_interface.ini SymmetricCipherInterface
30 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_interface.ini AsymmetricCipherInterface
31 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_interface.ini HashInterface
32 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_interface.ini HashNewInterface
33 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_interface.ini RandomInterface
34 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_interface.ini SignerInterface
35 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_interface.ini VerifierInterface
36 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_interface.ini KeyPairGenInterface
37 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_interface.ini KeyAgreementInterface
38 END_TESTCASE SEC-CRYPTOSPI-RULE-0007
40 //! @SYMTestCaseID SEC-CRYP005-RULES-MAC-0003
41 //! @SYMTestCaseDesc Tests the selection rule on common and non-common characteristics would
42 //! influence the framework when choosing KCryptoPluginAesXcbcPrf128 plug-in
44 //! (RuleSelection_MacInterface)
45 //! @SYMREQ REQ10620, REQ10621
46 //! @SYMTestPriority High
48 //! @SYMTestStatus Implemented
49 //! @SYMTestExpectedResults The call to the MAC factory method should return KErrNone,
50 //! successfully create the implementation object, the Algorithm ID characteristic
51 //! should equal KCryptoPluginAesXcbcPrf128 and the Implementation ID should equal
52 //! KTestPlugin02XcbcPrf128.
54 START_TESTCASE SEC-CRYP005-RULES-MAC-0003
55 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_interface.ini MacInterface
56 END_TESTCASE SEC-CRYP005-RULES-MAC-0003
58 //**************************************************************************************
60 //! @SYMTestCaseID SEC-CRYPTOSPI-RULE-0008
61 //! @SYMTestCaseDesc RuleSelection_AllChars
63 START_TESTCASE SEC-CRYPTOSPI-RULE-0008
64 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_allchars.ini SymmetricCipherAllChars
65 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_allchars.ini AsymmetricCipherAllChars
66 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_allchars.ini HashAllChars
67 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_allchars.ini HashNewAllChars
68 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_allchars.ini RandomAllChars
69 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_allchars.ini SignerAllChars
70 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_allchars.ini VerifierAllChars
71 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_allchars.ini KeyPairGenAllChars
72 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_allchars.ini KeyAgreementAllChars
73 END_TESTCASE SEC-CRYPTOSPI-RULE-0008
75 //! @SYMTestCaseID SEC-CRYP005-RULES-MAC-0001
76 //! @SYMTestCaseDesc Tests the selection rule on common and non-common characteristics
77 //! would influence the framework when choosing KTestPlugin02XcbcMac96
79 //! (RuleSelection_MacAllChars)
80 //! @SYMREQ REQ10616, REQ10618
81 //! @SYMTestPriority High
83 //! @SYMTestStatus Implemented
84 //! @SYMTestExpectedResults The call to the MAC factory method should return KErrNone,
85 //! successfully create the implementation object, the Algorithm ID
86 //! characteristic should equal KAlgorithmCipherAesXcbcMac96 and the
87 //! Implementation ID should equal KTestPlugin02XcbcMac96
89 START_TESTCASE SEC-CRYP005-RULES-MAC-0001
90 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_allchars.ini MacAllChars
91 END_TESTCASE SEC-CRYP005-RULES-MAC-0001
93 //**************************************************************************************
95 //! @SYMTestCaseID SEC-CRYPTOSPI-RULE-0009
96 //! @SYMTestCaseDesc RuleSelection_Ascend
98 START_TESTCASE SEC-CRYPTOSPI-RULE-0009
100 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_ascend.ini CreatorName
101 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_ascend.ini MaxConcurrency
102 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_ascend.ini Latency
103 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_ascend.ini Throughput
104 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_ascend.ini HashBlockSize
105 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_ascend.ini HashOutputSize
106 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_ascend.ini SymmetricCipherKeyLength
107 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_ascend.ini SymmetricCipherBlockSize
108 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_ascend.ini SymmetricCipherKeySupport
109 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_ascend.ini AsymmetricCipherKeyLength
110 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_ascend.ini AsymmetricCipherKeySupport
111 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_ascend.ini SignatureKeyLength
112 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_ascend.ini SignatureKeySupport
113 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_ascend.ini RandomBlockingMode
114 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_ascend.ini KeyPairGenKeyLength
116 END_TESTCASE SEC-CRYPTOSPI-RULE-0009
118 //**************************************************************************************
120 //! @SYMTestCaseID SEC-CRYPTOSPI-RULE-0010
121 //! @SYMTestCaseDesc RuleSelection_Descend
123 START_TESTCASE SEC-CRYPTOSPI-RULE-0010
125 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_descend.ini CreatorName
126 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_descend.ini MaxConcurrency
127 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_descend.ini Latency
128 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_descend.ini Throughput
129 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_descend.ini HashBlockSize
130 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_descend.ini HashOutputSize
131 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_descend.ini SymmetricCipherKeyLength
132 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_descend.ini SymmetricCipherBlockSize
133 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_descend.ini SymmetricCipherKeySupport
134 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_descend.ini AsymmetricCipherKeyLength
135 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_descend.ini AsymmetricCipherKeySupport
136 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_descend.ini SignatureKeyLength
137 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_descend.ini SignatureKeySupport
138 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_descend.ini RandomBlockingMode
139 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_descend.ini KeyPairGenKeyLength
141 END_TESTCASE SEC-CRYPTOSPI-RULE-0010
143 //**************************************************************************************
145 //! @SYMTestCaseID SEC-CRYPTOSPI-RULE-0011
146 //! @SYMTestCaseDesc RuleSelection_Matrix
148 START_TESTCASE SEC-CRYPTOSPI-RULE-0011
150 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_matrix.ini HashValid
151 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_matrix.ini HashValid2
152 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_matrix.ini RandomValid
153 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_matrix.ini SymmetricCipherValid
154 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_matrix.ini AsymmetricCipherValid
155 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_matrix.ini SignerValid
156 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_matrix.ini VerifierValid
157 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_matrix.ini KeyAgreementValid
158 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_matrix.ini KeyPairGeneratorValid
159 RUN_TEST_STEP !Result=-5 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_matrix.ini HashInvalid
160 RUN_TEST_STEP !Result=-5 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_matrix.ini HashInvalid2
161 RUN_TEST_STEP !Result=-5 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_matrix.ini RandomInvalid
162 RUN_TEST_STEP !Result=-5 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_matrix.ini SymmetricCipherInvalid
163 RUN_TEST_STEP !Result=-5 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_matrix.ini AsymmetricCipherInvalid
164 RUN_TEST_STEP !Result=-5 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_matrix.ini SignerInvalid
165 RUN_TEST_STEP !Result=-5 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_matrix.ini VerifierInvalid
166 RUN_TEST_STEP !Result=-5 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_matrix.ini KeyAgreementInvalid
167 RUN_TEST_STEP !Result=-5 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_matrix.ini KeyPairGeneratorInvalid
168 RUN_TEST_STEP !Result=-6 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_matrix.ini RuleInvalid01
169 RUN_TEST_STEP !Result=-6 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_matrix.ini RuleInvalid02
170 RUN_TEST_STEP !Result=-6 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_matrix.ini RuleInvalid03
171 RUN_TEST_STEP !Result=-6 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_matrix.ini RuleInvalid04
172 RUN_TEST_STEP !Result=-6 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_matrix.ini RuleInvalid05
173 RUN_TEST_STEP !Result=-6 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_matrix.ini RuleInvalid06
174 RUN_TEST_STEP !Result=-6 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_matrix.ini RuleInvalid07
175 END_TESTCASE SEC-CRYPTOSPI-RULE-0011
178 //! @SYMTestCaseID SEC-CRYP002-PLUGIN-MAC-0001
179 //! @SYMTestCaseDesc Tests the out of bound rule on common characteristics would not return a MAC plug-in module.
180 //! @SYMTestPriority High
182 //! @SYMTestStatus Implemented
183 //! @SYMTestExpectedResults The call to the factory method should return KErrNotFound,
184 //! as the rules applied did not return any plug-in module.
186 START_TESTCASE SEC-CRYP002-PLUGIN-MAC-0001
187 RUN_TEST_STEP !Result=-5 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_matrix.ini MacInvalid01
188 END_TESTCASE SEC-CRYP002-PLUGIN-MAC-0001
191 //! @SYMTestCaseID SEC-CRYP002-PLUGIN-MAC-0002
192 //! @SYMTestCaseDesc Tests the selection rule on out-of-bound non-common characteristics would not return a
193 //! MAC plug-in module.
194 //! @SYMTestPriority High
196 //! @SYMTestStatus Implemented
197 //! @SYMTestExpectedResults The call to the factory method should return KErrNotFound,
198 //! as the rules applied did not return any plug-in module.
200 START_TESTCASE SEC-CRYP002-PLUGIN-MAC-0002
201 RUN_TEST_STEP !Result=-5 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_matrix.ini MacInvalid02
202 END_TESTCASE SEC-CRYP002-PLUGIN-MAC-0002
204 //! @SYMTestCaseID SEC-CRYPTOSPI-RULE-0012
205 //! @SYMTestCaseDesc RuleSelection_Extended
207 START_TESTCASE SEC-CRYPTOSPI-RULE-0012
209 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_extended.ini ExtendedAllChars1
210 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_extended.ini ExtendedAllChars2
211 RUN_TEST_STEP !Result=-6 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_extended.ini ExtendedAscend
212 RUN_TEST_STEP !Result=-6 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_extended.ini ExtendedDescend
213 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_extended.ini ExtendedGreaterThan
214 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_extended.ini ExtendedGreaterThanOrEqual
215 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_extended.ini ExtendedLessThan
216 RUN_TEST_STEP 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_extended.ini ExtendedLessThanOrEqual
217 RUN_TEST_STEP !Result=-5 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_extended.ini ExtendedInvalid1
218 RUN_TEST_STEP !Result=-5 100 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_extended.ini ExtendedInvalid2
220 END_TESTCASE SEC-CRYPTOSPI-RULE-0012
222 //**************************************************************************************
224 RUN_PROGRAM cryptospisetup.exe 1
226 //! @SYMTestCaseID SEC-CRYPTOSPI-RULE-0013
227 //! @SYMTestCaseDesc RuleSelection_Matrix2
229 START_TESTCASE SEC-CRYPTOSPI-RULE-0013
230 RUN_TEST_STEP !Result=-5 Te_CryptoSpi RuleSelectCommonStep c:\testdata\tcryptospi\configs\ruleselection_interface.ini MacInterface
231 END_TESTCASE SEC-CRYPTOSPI-RULE-0013
233 RUN_PROGRAM cryptospisetup.exe
235 PRINT Complete te_ruleselection_Tests