os/security/cryptoservices/certificateandkeymgmt/tpkixcert_tef/scripts/tpkixcert_tef.script
First public contribution.
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 //! @SYMTestSuiteName SEC-CERTMAN
18 //! @SYMScriptTestEnvironment The script has no specific test environment requirements.
19 //! @SYMScriptPurpose Test the published API functions of CPKIXCertChain.
21 LOAD_SUITE tpkixcert_tefserver
24 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-DATETIME-0001
25 //! @SYMTestCaseDesc Testing CPKIXCertChain date and time checking behaviour during certificate validation.
27 //! @SYMTestPriority Critical
28 //! @SYMTestActions 1) Construct the certificate chain.
29 //! 2) Call CPKIXCertChain::ValidateL() passing in a validation time where the certificate chain has expired.
30 //! 3) Call CPKIXCertChain::SetValidityPeriodCheckFatal() passing in EFalse.
31 //! 4) Call CPKIXCertChain::ValidateL() passing in a validation time where the certificate chain has expired.
32 //! 5) Call CPKIXCertChain::SetValidityPeriodCheckFatal() passing in ETrue.
33 //! 6) Call CPKIXCertChain::ValidateL() passing in a validation time where the certificate chain has expired.
34 //! 7) Cleanup the certificate chain and utility classes.
35 //! @SYMTestExpectedResults Calls 2 and 6 should fail with EDateOutOfRange. Call 4 should pass with EValidatedOK but report the warning EDateOutOfRange through both the old warnings API(CPKIXValidationResult::Warnings()) and the new one(CCertificateWarning::Warnings()).
37 //! @SYMTestPurpose 1) Check that current behaviour has not been altered and we still fail to validate out of date certificate chains.
38 //! 2) Check that new behaviour works correctly by allowing a certificate chain with an invalid date to validate successfully when explicitly told to.
39 //! 3) Then ensure this has left the system in the correct state to maintain normal behaviour.
40 START_TESTCASE SEC-CERTMAN-PKIXCERT-DATETIME-0001
41 RUN_TEST_STEP 100 tpkixcert_tefserver DateTimeFatalValidateTest c:\tpkixcert_tef\scripts\validatetests.ini ExpiredDateTime
42 END_TESTCASE SEC-CERTMAN-PKIXCERT-DATETIME-0001
45 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-DATETIME-0002
46 //! @SYMTestCaseDesc TestingCPKIXCertChain date and time checking behaviour during certificate validation.
48 //! @SYMTestPriority Critical
49 //! @SYMTestActions 1) Construct the certificate chain.
50 //! 2) Call CPKIXCertChain::ValidateL() passing in a validation time where the certificate chain has not yet become valid.
51 //! 3) Call CPKIXCertChain::SetValidityPeriodCheckFatal() passing in EFalse.
52 //! 4) Call CPKIXCertChain::ValidateL() passing in a validation time where the certificate chain has not yet become valid.
53 //! 5) Call CPKIXCertChain::SetValidityPeriodCheckFatal() passing in ETrue.
54 //! 6) Call CPKIXCertChain::ValidateL() passing in a validation time where the certificate chain has not yet become valid.
55 //! 7) Cleanup the certificate chain and utility classes.
56 //! @SYMTestExpectedResults Calls 2 and 6 should fail with EDateOutOfRange. Call 4 should pass with EValidatedOK but report the warning EDateOutOfRange through both the old warnings API(CPKIXValidationResult::Warnings()) and the new one(CCertificateWarning::Warnings()).
58 //! @SYMTestPurpose 1) Check that current behaviour has not been altered and we still fail to validate out of date certificate chains.
59 //! 2) Check that new behaviour works correctly by allowing a certificate chain with an invalid date to validate successfully when explicitly told to.
60 //! 3) Then ensure this has left the system in the correct state to maintain normal behaviour.
61 START_TESTCASE SEC-CERTMAN-PKIXCERT-DATETIME-0002
62 RUN_TEST_STEP 100 tpkixcert_tefserver DateTimeFatalValidateTest c:\tpkixcert_tef\scripts\validatetests.ini InvalidDateTime
63 END_TESTCASE SEC-CERTMAN-PKIXCERT-DATETIME-0002
66 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-DATETIME-0003
67 //! @SYMTestCaseDesc TestingCPKIXCertChain date and time checking behaviour during certificate validation.
69 //! @SYMTestPriority Critical
70 //! @SYMTestActions 1) Construct the certificate chain.
71 //! 2) Call CPKIXCertChain::ValidateL() passing in a validation time where the certificate chain is valid.
72 //! 3) Call CPKIXCertChain::SetValidityPeriodCheckFatal() passing in EFalse.
73 //! 4) Call CPKIXCertChain::ValidateL() passing in a validation time where the certificate chain is valid.
74 //! 5) Call CPKIXCertChain::SetValidityPeriodCheckFatal() passing in ETrue.
75 //! 6) Call CPKIXCertChain::ValidateL() passing in a validation time where the certificate chain is valid.
76 //! 7) Cleanup the certificate chain and utility classes.
77 //! @SYMTestExpectedResults Calls 2, 4 and 6 should validate successfully with EValidatedOK.
79 //! @SYMTestPurpose 1) Check that current behaviour has not been altered and we still fail to validate out of date certificate chains.
80 //! 2) Check that new behaviour works correctly by allowing a certificate chain with an invalid date to validate successfully when explicitly told to.
81 //! 3) Then ensure this has left the system in the correct state to maintain normal behaviour.
82 START_TESTCASE SEC-CERTMAN-PKIXCERT-DATETIME-0003
83 RUN_TEST_STEP 100 tpkixcert_tefserver DateTimeFatalValidateTest c:\tpkixcert_tef\scripts\validatetests.ini ValidDateTime
84 END_TESTCASE SEC-CERTMAN-PKIXCERT-DATETIME-0003
87 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-CRITEXT-0001
88 //! @SYMTestCaseDesc Test correct behaviour of customisable supported critical extension processing.
90 //! @SYMTestPriority Critical
91 //! @SYMTestActions 1) Construct the certificate chain.
92 //! 2) Set the supported OID list to the default OIDs and the new ones through a call to CPKIXCertChain::SetSupportedCriticalExtensionsL().
93 //! 3) Call CPKIXCertChain::ValidateL().
94 //! 4) Ensure all critical extensions encountered are supported and that the certificate and certificate index information in the results match up with the correct certificates.
95 //! 5) Cleanup the certificate chain and utility classes.
96 //! @SYMTestExpectedResults Chain should validate successfully. All critical extensions should be reported through the new certificate warnings API (CCertificateWarning::CriticalExtensionsFound()).
98 //! @SYMTestPurpose Test we correctly report the full gamut of possible critical extension patterns we may be expected to deal with in a certificate chain – multiple extensions in one certificate, multiple extensions spanning multiple certificates and the same extension in multiple certificates.
99 START_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0001
100 RUN_TEST_STEP 100 tpkixcert_tefserver ValidateCertChain c:\tpkixcert_tef\scripts\validatetests.ini CustomCriticalExts
101 RUN_TEST_STEP 100 tpkixcert_tefserver ValidateCertChain c:\tpkixcert_tef\scripts\validatetests.ini CustomCriticalExts1
102 END_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0001
105 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-CRITEXT-0002
106 //! @SYMTestCaseDesc Test old and new warnings API for consistency and backwards compatibility.
108 //! @SYMTestPriority Critical
109 //! @SYMTestActions 1) Construct the certificate chain.
110 //! 2) Set the supported OID list to the default OIDs and the new ones through a call to CPKIXCertChain::SetSupportedCriticalExtensionsL().
111 //! 3) Call CPKIXCertChain::ValidateL().
112 //! 4) Compare resultant warnings.
113 //! 5) Cleanup the certificate chain and utility classes.
114 //! @SYMTestExpectedResults Chain should validate successfully. Each of the recognised critical extensions should be reported both as a warning through the old warnings return and through the new API CCertificateWarning::CriticalExtensionsFound(). CCertificateWarning::Warnings() should contain the other warnings found in CPKIXValidationResult::Warnings(). The new returns mechanism should have no additional warnings.
116 //! @SYMTestPurpose Ensure backwards compatibility of old style warning reporting and ensure the new warning returns match up with this.
117 START_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0002
118 RUN_TEST_STEP 100 tpkixcert_tefserver ValidateCertChain c:\tpkixcert_tef\scripts\validatetests.ini Warnings
119 END_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0002
122 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-CRITEXT-0003
123 //! @SYMTestCaseDesc Check supported OID list processing resilience.
125 //! @SYMTestPriority Critical
126 //! @SYMTestActions 1) Construct certificate chain.
127 //! 2) Set the supported OID list to the default OIDs and a new invalid format OID through a call to CPKIXCertChain::SetSupportedCriticalExtensionsL().
128 //! 3) Call CPKIXCertChain::ValidateL().
129 //! 4) Cleanup the certificate chain and utility classes.
130 //! @SYMTestExpectedResults Chain should validate successfully with EValidatedOK with expected warnings returned.
132 //! @SYMTestPurpose Check the code is resilient to badly formed OID data being passed in to the supported OID list.
133 START_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0003
134 RUN_TEST_STEP 100 tpkixcert_tefserver ValidateCertChain c:\tpkixcert_tef\scripts\validatetests.ini BadOidValue
135 END_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0003
138 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-CRITEXT-0004
139 //! @SYMTestCaseDesc Check supported OID list processing resilience.
141 //! @SYMTestPriority Critical
142 //! @SYMTestActions 1) Construct certificate chain.
143 //! 2) Set the supported OID list to an empty one through a call to CPKIXCertChain::SetSupportedCriticalExtensionsL().
144 //! 3) Call CPKIXCertChain::ValidateL().
145 //! 4) Cleanup the certificate chain and utility classes.
146 //! @SYMTestExpectedResults Chain should error with EUnrecognizedCriticalExtension (it is necessary for the CA to contain a critical extension).
148 //! @SYMTestPurpose Check the code is resilient to an empty supported OID list.
149 START_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0004
150 RUN_TEST_STEP 100 tpkixcert_tefserver ValidateCertChain c:\tpkixcert_tef\scripts\validatetests.ini EmptySupportedOidList
151 END_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0004
154 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-CRITEXT-0005
155 //! @SYMTestCaseDesc Test the Append API for manipulating supported OID list for correct behaviour.
157 //! @SYMTestPriority Critical
158 //! @SYMTestActions 1) Construct the certificate chain.
159 //! 2) Append a collection of new OIDs through CPKIXCertChain::AddSupportedCriticalExtensionsL().
160 //! 3) Call CPKIXCertChain::ResetSupportedCriticalExtsToDefaultL().
161 //! 4) Append a collection of OIDs already in the supported list through CPKIXCertChain::AddSupportedCriticalExtensionsL().
162 //! 5) Call CPKIXCertChain::ResetSupportedCriticalExtsToDefaultL().
163 //! 6) Append a collection of OIDs with duplicates within the collection.
164 //! 7) Call CPKIXCertChain::ResetSupportedCriticalExtsToDefaultL().
165 //! 8) Append an empty collection of OIDs through CPKIXCertChain::AddSupportedCriticalExtensionsL().
166 //! 9) Cleanup the certificate chain and utility classes.
167 //! @SYMTestExpectedResults Supported OID list should be updated correctly in each case.
169 //! @SYMTestPurpose Ensure OIDs are added to the supported list, that the result contains no duplicates and no errors are reported.
170 START_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0005
171 RUN_TEST_STEP 100 tpkixcert_tefserver AddSupportedOidsTest c:\tpkixcert_tef\scripts\apitests.ini NewOids
172 RUN_TEST_STEP 100 tpkixcert_tefserver AddSupportedOidsTest c:\tpkixcert_tef\scripts\apitests.ini AlreadySupportedOids
173 RUN_TEST_STEP 100 tpkixcert_tefserver AddSupportedOidsTest c:\tpkixcert_tef\scripts\apitests.ini OidsWithDuplicates
174 RUN_TEST_STEP 100 tpkixcert_tefserver AddSupportedOidsTest c:\tpkixcert_tef\scripts\apitests.ini NoOids
175 END_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0005
178 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-CRITEXT_OOM-0005
179 //! @SYMTestCaseDesc Test the Append API for manipulating supported OID list for correct behaviour.
181 //! @SYMTestPriority Critical
182 //! @SYMTestActions OOM loop around steps 1 to 9:
183 //! 1) Construct the certificate chain.
184 //! 2) Append a collection of new OIDs through CPKIXCertChain::AddSupportedCriticalExtensionsL().
185 //! 3) Call CPKIXCertChain::ResetSupportedCriticalExtsToDefaultL().
186 //! 4) Append a collection of OIDs already in the supported list through CPKIXCertChain::AddSupportedCriticalExtensionsL().
187 //! 5) Call CPKIXCertChain::ResetSupportedCriticalExtsToDefaultL().
188 //! 6) Append a collection of OIDs with duplicates within the collection.
189 //! 7) Call CPKIXCertChain::ResetSupportedCriticalExtsToDefaultL().
190 //! 8) Append an empty collection of OIDs through CPKIXCertChain::AddSupportedCriticalExtensionsL().
191 //! 9) Cleanup the certificate chain and utility classes.
192 //! @SYMTestExpectedResults There should be no memory leaks at any stage.
194 //! @SYMTestPurpose Ensure OIDs are added to the supported list, that the result contains no duplicates and no errors are reported.
195 START_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT_OOM-0005
196 RUN_TEST_STEP 100 tpkixcert_tefserver AddSupportedOidsTest c:\tpkixcert_tef\scripts\apitests.ini OomNewOids
197 RUN_TEST_STEP 100 tpkixcert_tefserver AddSupportedOidsTest c:\tpkixcert_tef\scripts\apitests.ini OomAlreadySupportedOids
198 RUN_TEST_STEP 100 tpkixcert_tefserver AddSupportedOidsTest c:\tpkixcert_tef\scripts\apitests.ini OomOidsWithDuplicates
199 RUN_TEST_STEP 100 tpkixcert_tefserver AddSupportedOidsTest c:\tpkixcert_tef\scripts\apitests.ini OomNoOids
200 END_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT_OOM-0005
203 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-CRITEXT-0006
204 //! @SYMTestCaseDesc Test the Remove API for manipulating supported OID list for correct behaviour.
206 //! @SYMTestPriority Critical
207 //! @SYMTestActions 1) Construct the certificate chain.
208 //! 2) Remove a collection of OIDs currently supported in the list through CPKIXCertChain::RemoveSupportedCriticalExtensions().
209 //! 3) Call CPKIXCertChain::ResetSupportedCriticalExtsToDefaultL().
210 //! 4) Remove a collection of OIDs not currently supported in the list through CPKIXCertChain::RemoveSupportedCriticalExtensions().
211 //! 5) Call CPKIXCertChain::ResetSupportedCriticalExtsToDefaultL().
212 //! 6) Remove an empty collection of OIDs through CPKIXCertChain::AddSupportedCriticalExtensionsL().
213 //! 7) Cleanup the certificate chain and utility classes.
214 //! @SYMTestExpectedResults Supported OID list should be updated correctly in each case.
216 //! @SYMTestPurpose Ensure OIDs are removed from the supported list and no errors are reported.
217 START_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0006
218 RUN_TEST_STEP 100 tpkixcert_tefserver RemoveSupportedOidsTest c:\tpkixcert_tef\scripts\apitests.ini NewOids
219 RUN_TEST_STEP 100 tpkixcert_tefserver RemoveSupportedOidsTest c:\tpkixcert_tef\scripts\apitests.ini AlreadySupportedOids
220 RUN_TEST_STEP 100 tpkixcert_tefserver RemoveSupportedOidsTest c:\tpkixcert_tef\scripts\apitests.ini SupportedOidsWithDuplicates
221 RUN_TEST_STEP 100 tpkixcert_tefserver RemoveSupportedOidsTest c:\tpkixcert_tef\scripts\apitests.ini NoOids
222 END_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0006
225 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-CRITEXT_OOM-0006
226 //! @SYMTestCaseDesc Test the Remove API for manipulating supported OID list for correct behaviour.
228 //! @SYMTestPriority Critical
229 //! @SYMTestActions OOM loop around steps 1 to 7:
230 //! 1) Construct the certificate chain.
231 //! 2) Remove a collection of OIDs currently supported in the list through CPKIXCertChain::RemoveSupportedCriticalExtensions().
232 //! 3) Call CPKIXCertChain::ResetSupportedCriticalExtsToDefaultL().
233 //! 4) Remove a collection of OIDs not currently supported in the list through CPKIXCertChain::RemoveSupportedCriticalExtensions().
234 //! 5) Call CPKIXCertChain::ResetSupportedCriticalExtsToDefaultL().
235 //! 6) Remove an empty collection of OIDs through CPKIXCertChain::AddSupportedCriticalExtensionsL().
236 //! 7) Cleanup the certificate chain and utility classes.
237 //! @SYMTestExpectedResults There should be no memory leaks at any stage.
239 //! @SYMTestPurpose Ensure OIDs are removed from the supported list and no errors are reported.
240 START_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT_OOM-0006
241 RUN_TEST_STEP 100 tpkixcert_tefserver RemoveSupportedOidsTest c:\tpkixcert_tef\scripts\apitests.ini OomNewOids
242 RUN_TEST_STEP 100 tpkixcert_tefserver RemoveSupportedOidsTest c:\tpkixcert_tef\scripts\apitests.ini OomAlreadySupportedOids
243 RUN_TEST_STEP 100 tpkixcert_tefserver RemoveSupportedOidsTest c:\tpkixcert_tef\scripts\apitests.ini OomSupportedOidsWithDuplicates
244 RUN_TEST_STEP 100 tpkixcert_tefserver RemoveSupportedOidsTest c:\tpkixcert_tef\scripts\apitests.ini OomNoOids
245 END_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT_OOM-0006
248 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-CRITEXT-0007
249 //! @SYMTestCaseDesc Test the Reset API for manipulating supported OID list for correct behaviour.
251 //! @SYMTestPriority Critical
252 //! @SYMTestActions 1) Construct the certificate chain.
253 //! 2) Call CPKIXCertChain::ResetSupportedCriticalExtsToDefaultL() with an empty supported OID list.
254 //! 3) Call CPKIXCertChain::ResetSupportedCriticalExtsToDefaultL() on a non empty, no default (one new OID added and one default OID removed)
255 //! supported OID list.
256 //! 4) Cleanup the certificate chain and utility classes.
257 //! @SYMTestExpectedResults Supported OID list should be updated correctly in each case.
259 //! @SYMTestPurpose Ensure the supported OID list is reset to the default values correctly.
260 START_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0007
261 RUN_TEST_STEP 100 tpkixcert_tefserver ResetSupportedOidsTest c:\tpkixcert_tef\scripts\apitests.ini NoOids
262 RUN_TEST_STEP 100 tpkixcert_tefserver ResetSupportedOidsTest c:\tpkixcert_tef\scripts\apitests.ini OneAddedOneRemoved
263 END_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0007
266 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-CRITEXT_OOM-0007
267 //! @SYMTestCaseDesc Test the Reset API for manipulating supported OID list for correct behaviour.
269 //! @SYMTestPriority Critical
270 //! @SYMTestActions OOM loop around steps 1 to 4:
271 //! 1) Construct the certificate chain.
272 //! 2) Call CPKIXCertChain::ResetSupportedCriticalExtsToDefaultL() with an empty supported OID list.
273 //! 3) Call CPKIXCertChain::ResetSupportedCriticalExtsToDefaultL() on a non empty, no default (one new OID added and one default OID removed)
274 //! supported OID list.
275 //! 4) Cleanup the certificate chain and utility classes.
276 //! @SYMTestExpectedResults There should be no memory leaks at any stage.
278 //! @SYMTestPurpose Ensure the supported OID list is reset to the default values correctly.
279 START_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT_OOM-0007
280 RUN_TEST_STEP 100 tpkixcert_tefserver ResetSupportedOidsTest c:\tpkixcert_tef\scripts\apitests.ini OomNoOids
281 RUN_TEST_STEP 100 tpkixcert_tefserver ResetSupportedOidsTest c:\tpkixcert_tef\scripts\apitests.ini OomOneAddedOneRemoved
282 END_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT_OOM-0007
285 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-CRITEXT-0008
286 //! @SYMTestCaseDesc Test the Set API for manipulating supported OID list for correct behaviour.
288 //! @SYMTestPriority Critical
289 //! @SYMTestActions 1) Construct the certificate chain.
290 //! 2) Set an empty collection of OIDs through CPKIXCertChain::SetSupportedCriticalExtensionsL().
291 //! 3) Call CPKIXCertChain::ResetSupportedCriticalExtsToDefaultL().
292 //! 4) Set a collection of non empty (one new OID and one default OID removed) collection of OIDs through CPKIXCertChain::SetSupportedCriticalExtensionsL().
293 //! 5) Call CPKIXCertChain::ResetSupportedCriticalExtsToDefaultL().
294 //! 6) Set the same collection of OIDs as is currently supported through CPKIXCertChain::SetSupportedCriticalExtensionsL().
295 //! 7) Call CPKIXCertChain::ResetSupportedCriticalExtsToDefaultL().
296 //! 8) Set a collection of OIDs containing internal duplicates through CPKIXCertChain::SetSupportedCriticalExtensionsL().
297 //! 9) Cleanup the certificate chain and utility classes.
298 //! @SYMTestExpectedResults Supported OID list should be updated correctly in each case.
300 //! @SYMTestPurpose Ensure supported OID list is updated correctly, the result contains no duplicates and no errors are reported.
301 START_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0008
302 RUN_TEST_STEP 100 tpkixcert_tefserver SetSupportedOidsTest c:\tpkixcert_tef\scripts\apitests.ini NoOids
303 RUN_TEST_STEP 100 tpkixcert_tefserver SetSupportedOidsTest c:\tpkixcert_tef\scripts\apitests.ini OneAddedOneRemoved
304 RUN_TEST_STEP 100 tpkixcert_tefserver SetSupportedOidsTest c:\tpkixcert_tef\scripts\apitests.ini CurrentlySupported
305 RUN_TEST_STEP 100 tpkixcert_tefserver SetSupportedOidsTest c:\tpkixcert_tef\scripts\apitests.ini OidsWithDuplicates
306 END_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0008
309 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-CRITEXT_OOM-0008
310 //! @SYMTestCaseDesc Test the Set API for manipulating supported OID list for correct behaviour.
312 //! @SYMTestPriority Critical
313 //! @SYMTestActions OOM loop around steps 1 to 9:
314 //! 1) Construct the certificate chain.
315 //! 2) Set an empty collection of OIDs through CPKIXCertChain::SetSupportedCriticalExtensionsL().
316 //! 3) Call CPKIXCertChain::ResetSupportedCriticalExtsToDefaultL().
317 //! 4) Set a collection of non empty (one new OID and one default OID removed) collection of OIDs through CPKIXCertChain::SetSupportedCriticalExtensionsL().
318 //! 5) Call CPKIXCertChain::ResetSupportedCriticalExtsToDefaultL().
319 //! 6) Set the same collection of OIDs as is currently supported through CPKIXCertChain::SetSupportedCriticalExtensionsL().
320 //! 7) Call CPKIXCertChain::ResetSupportedCriticalExtsToDefaultL().
321 //! 8) Set a collection of OIDs containing internal duplicates through CPKIXCertChain::SetSupportedCriticalExtensionsL().
322 //! 9) Cleanup the certificate chain and utility classes.
323 //! @SYMTestExpectedResults There should be no memory leaks at any stage.
325 //! @SYMTestPurpose Ensure supported OID list is updated correctly, the result contains no duplicates and no errors are reported.
326 START_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT_OOM-0008
327 RUN_TEST_STEP 100 tpkixcert_tefserver SetSupportedOidsTest c:\tpkixcert_tef\scripts\apitests.ini OomNoOids
328 RUN_TEST_STEP 100 tpkixcert_tefserver SetSupportedOidsTest c:\tpkixcert_tef\scripts\apitests.ini OomOneAddedOneRemoved
329 RUN_TEST_STEP 100 tpkixcert_tefserver SetSupportedOidsTest c:\tpkixcert_tef\scripts\apitests.ini OomCurrentlySupported
330 RUN_TEST_STEP 100 tpkixcert_tefserver SetSupportedOidsTest c:\tpkixcert_tef\scripts\apitests.ini OomOidsWithDuplicates
331 END_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT_OOM-0008
334 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-CRITEXT-0009
335 //! @SYMTestCaseDesc Test CPKIXCertChain::ValidateL() code fails correctly.
337 //! @SYMTestPriority Critical
338 //! @SYMTestActions 1) Construct the certificate chain.
339 //! 2) Set the supported OID list to the default OIDs and the new one through a call to CPKIXCertChain::SetSupportedCriticalExtensionsL().
340 //! 3) Call CPKIXCertChain::ValidateL(). The default OID value for KExtendedKeyUsage is not set.
341 //! 4) Ensure the correct error value is returned
342 //! 5) Cleanup the certificate chain and utility classes.
343 //! @SYMTestExpectedResults The validation should return with EUnrecognisedCriticalExtension
345 //! @SYMTestPurpose Ensure we fail correctly for critical extension OIDs encountered that are outside the specified list that we recognise.
346 START_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0009
347 RUN_TEST_STEP 100 tpkixcert_tefserver ValidateCertChain c:\tpkixcert_tef\scripts\validatetests.ini Missing_ExtendedKeyUsage
348 END_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0009
351 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-CRITEXT-0010
352 //! @SYMTestCaseDesc Test CPKIXCertChain::ValidateL() code fails correctly.
354 //! @SYMTestPriority Critical
355 //! @SYMTestActions 1) Construct the certificate chain.
356 //! 2) Set the supported OID list to the default OIDs and the new one through a call to CPKIXCertChain::SetSupportedCriticalExtensionsL().
357 //! 3) Call CPKIXCertChain::ValidateL(). The default OID value for KPolicyMapping is not set.
358 //! 4) Ensure the correct error value is returned
359 //! 5) Cleanup the certificate chain and utility classes.
360 //! @SYMTestExpectedResults The validation should return with EUnrecognisedCriticalExtension
362 //! @SYMTestPurpose Ensure we fail correctly for critical extension OIDs encountered that are outside the specified list that we recognise.
363 START_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0010
364 RUN_TEST_STEP 100 tpkixcert_tefserver ValidateCertChain c:\tpkixcert_tef\scripts\validatetests.ini Missing_PolicyMapping
365 END_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0010
368 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-CRITEXT-0011
369 //! @SYMTestCaseDesc Test CPKIXCertChain::ValidateL() code fails correctly.
371 //! @SYMTestPriority Critical
372 //! @SYMTestActions 1) Construct the certificate chain.
373 //! 2) Set the supported OID list to the default OIDs and the new one through a call to CPKIXCertChain::SetSupportedCriticalExtensionsL().
374 //! 3) Call CPKIXCertChain::ValidateL(). The default OID value for KDeviceListConstraint is not set.
375 //! 4) Ensure the correct error value is returned
376 //! 5) Cleanup the certificate chain and utility classes.
377 //! @SYMTestExpectedResults The validation should return with EUnrecognisedCriticalExtension
379 //! @SYMTestPurpose Ensure we fail correctly for critical extension OIDs encountered that are outside the specified list that we recognise.
380 START_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0011
381 RUN_TEST_STEP 100 tpkixcert_tefserver ValidateCertChain c:\tpkixcert_tef\scripts\validatetests.ini Missing_DeviceIdListConstraint
382 END_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0011
385 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-CRITEXT-0012
386 //! @SYMTestCaseDesc Test CPKIXCertChain::ValidateL() code fails correctly.
388 //! @SYMTestPriority Critical
389 //! @SYMTestActions 1) Construct the certificate chain.
390 //! 2) Set the supported OID list to the default OIDs and the new one through a call to CPKIXCertChain::SetSupportedCriticalExtensionsL().
391 //! 3) Call CPKIXCertChain::ValidateL(). The default OID value for KSidListConstraint is not set.
392 //! 4) Ensure the correct error value is returned
393 //! 5) Cleanup the certificate chain and utility classes.
394 //! @SYMTestExpectedResults The validation should return with EUnrecognisedCriticalExtension
396 //! @SYMTestPurpose Ensure we fail correctly for critical extension OIDs encountered that are outside the specified list that we recognise.
397 START_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0012
398 RUN_TEST_STEP 100 tpkixcert_tefserver ValidateCertChain c:\tpkixcert_tef\scripts\validatetests.ini Missing_SidListConstraint
399 END_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0012
402 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-CRITEXT-0013
403 //! @SYMTestCaseDesc Test CPKIXCertChain::ValidateL() code fails correctly.
405 //! @SYMTestPriority Critical
406 //! @SYMTestActions 1) Construct the certificate chain.
407 //! 2) Set the supported OID list to the default OIDs and the new one through a call to CPKIXCertChain::SetSupportedCriticalExtensionsL().
408 //! 3) Call CPKIXCertChain::ValidateL(). The default OID value for KVidListConstraint is not set.
409 //! 4) Ensure the correct error value is returned
410 //! 5) Cleanup the certificate chain and utility classes.
411 //! @SYMTestExpectedResults The validation should return with EUnrecognisedCriticalExtension
413 //! @SYMTestPurpose Ensure we fail correctly for critical extension OIDs encountered that are outside the specified list that we recognise.
414 START_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0013
415 RUN_TEST_STEP 100 tpkixcert_tefserver ValidateCertChain c:\tpkixcert_tef\scripts\validatetests.ini Missing_VidListConstraint
416 END_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0013
419 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-CRITEXT-0014
420 //! @SYMTestCaseDesc Test CPKIXCertChain::ValidateL() code fails correctly.
422 //! @SYMTestPriority Critical
423 //! @SYMTestActions 1) Construct the certificate chain.
424 //! 2) Set the supported OID list to the default OIDs and the new one through a call to CPKIXCertChain::SetSupportedCriticalExtensionsL().
425 //! 3) Call CPKIXCertChain::ValidateL(). The default OID value for KCapabilitiesConstraint is not set.
426 //! 4) Ensure the correct error value is returned
427 //! 5) Cleanup the certificate chain and utility classes.
428 //! @SYMTestExpectedResults The validation should return with EUnrecognisedCriticalExtension
430 //! @SYMTestPurpose Ensure we fail correctly for critical extension OIDs encountered that are outside the specified list that we recognise.
431 START_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0014
432 RUN_TEST_STEP 100 tpkixcert_tefserver ValidateCertChain c:\tpkixcert_tef\scripts\validatetests.ini Missing_CapabilitiesConstraint
433 END_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0014
436 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-CRITEXT-0015
437 //! @SYMTestCaseDesc Test CPKIXCertChain::ValidateL() code fails correctly.
439 //! @SYMTestPriority Critical
440 //! @SYMTestActions 1) Construct the certificate chain.
441 //! 2) Set the supported OID list to the default OIDs and the new one through a call to CPKIXCertChain::SetSupportedCriticalExtensionsL().
442 //! 3) Call CPKIXCertChain::ValidateL(). The default OID value for KCertPolicies is not set.
443 //! 4) Ensure the correct error value is returned
444 //! 5) Cleanup the certificate chain and utility classes.
445 //! @SYMTestExpectedResults The validation should return with EUnrecognisedCriticalExtension
447 //! @SYMTestPurpose Ensure we fail correctly for critical extension OIDs encountered that are outside the specified list that we recognise.
448 START_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0015
449 RUN_TEST_STEP 100 tpkixcert_tefserver ValidateCertChain c:\tpkixcert_tef\scripts\validatetests.ini Missing_CertPolicies
450 END_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0015
453 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-CRITEXT-0016
454 //! @SYMTestCaseDesc Test CPKIXCertChain::ValidateL() code fails correctly.
456 //! @SYMTestPriority Critical
457 //! @SYMTestActions 1) Construct the certificate chain.
458 //! 2) Set the supported OID list to the default OIDs and the new one through a call to CPKIXCertChain::SetSupportedCriticalExtensionsL().
459 //! 3) Call CPKIXCertChain::ValidateL(). The default OID value for KPolicyConstraints is not set.
460 //! 4) Ensure the correct error value is returned
461 //! 5) Cleanup the certificate chain and utility classes.
462 //! @SYMTestExpectedResults The validation should return with EUnrecognisedCriticalExtension
464 //! @SYMTestPurpose Ensure we fail correctly for critical extension OIDs encountered that are outside the specified list that we recognise.
465 START_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0016
466 RUN_TEST_STEP 100 tpkixcert_tefserver ValidateCertChain c:\tpkixcert_tef\scripts\validatetests.ini Missing_PolicyConstraint
467 END_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0016
470 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-CRITEXT-0017
471 //! @SYMTestCaseDesc Test CPKIXCertChain::ValidateL() code fails correctly.
473 //! @SYMTestPriority Critical
474 //! @SYMTestActions 1) Construct the certificate chain.
475 //! 2) Set the supported OID list to the default OIDs and the new one through a call to CPKIXCertChain::SetSupportedCriticalExtensionsL().
476 //! 3) Call CPKIXCertChain::ValidateL(). The default OID value for KNameConstraints is not set.
477 //! 4) Ensure the correct error value is returned
478 //! 5) Cleanup the certificate chain and utility classes.
479 //! @SYMTestExpectedResults The validation should return with EUnrecognisedCriticalExtension
481 //! @SYMTestPurpose Ensure we fail correctly for critical extension OIDs encountered that are outside the specified list that we recognise.
482 START_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0017
483 RUN_TEST_STEP 100 tpkixcert_tefserver ValidateCertChain c:\tpkixcert_tef\scripts\validatetests.ini Missing_NameConstraint
484 END_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0017
487 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-CRITEXT-0018
488 //! @SYMTestCaseDesc Test CPKIXCertChain::ValidateL() code fails correctly.
490 //! @SYMTestPriority Critical
491 //! @SYMTestActions 1) Construct the certificate chain.
492 //! 2) Set the supported OID list to the default OIDs and the new one through a call to CPKIXCertChain::SetSupportedCriticalExtensionsL().
493 //! 3) Call CPKIXCertChain::ValidateL(). The default OID value for KBasicConstraints is not set.
494 //! 4) Ensure the correct error value is returned
495 //! 5) Cleanup the certificate chain and utility classes.
496 //! @SYMTestExpectedResults The validation should return with EUnrecognisedCriticalExtension
498 //! @SYMTestPurpose Ensure we fail correctly for critical extension OIDs encountered that are outside the specified list that we recognise.
499 START_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0018
500 RUN_TEST_STEP 100 tpkixcert_tefserver ValidateCertChain c:\tpkixcert_tef\scripts\validatetests.ini Missing_BasicConstraint
501 END_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0018
504 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-CRITEXT-0019
505 //! @SYMTestCaseDesc Test CPKIXCertChain::ValidateL() code fails correctly.
507 //! @SYMTestPriority Critical
508 //! @SYMTestActions 1) Construct the certificate chain.
509 //! 2) Set the supported OID list to the default OIDs and the new one through a call to CPKIXCertChain::SetSupportedCriticalExtensionsL().
510 //! 3) Call CPKIXCertChain::ValidateL(). The default OID value for KKeyUsage is not set.
511 //! 4) Ensure the correct error value is returned
512 //! 5) Cleanup the certificate chain and utility classes.
513 //! @SYMTestExpectedResults The validation should return with EUnrecognisedCriticalExtension
515 //! @SYMTestPurpose Ensure we fail correctly for critical extension OIDs encountered that are outside the specified list that we recognise.
516 START_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0019
517 RUN_TEST_STEP 100 tpkixcert_tefserver ValidateCertChain c:\tpkixcert_tef\scripts\validatetests.ini Missing_KeyUsage
518 END_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0019
521 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-CRITEXT-0020
522 //! @SYMTestCaseDesc Test CPKIXCertChain::ValidateL() code fails correctly.
524 //! @SYMTestPriority Critical
525 //! @SYMTestActions 1) Construct the certificate chain.
526 //! 2) Set the supported OID list to the default OIDs and the new one through a call to CPKIXCertChain::SetSupportedCriticalExtensionsL().
527 //! 3) Call CPKIXCertChain::ValidateL(). The default OID value for KSubjectAltName is not set.
528 //! 4) Ensure the correct error value is returned
529 //! 5) Cleanup the certificate chain and utility classes.
530 //! @SYMTestExpectedResults The validation should return with EUnrecognisedCriticalExtension
532 //! @SYMTestPurpose Ensure we fail correctly for critical extension OIDs encountered that are outside the specified list that we recognise.
533 START_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0020
534 RUN_TEST_STEP 100 tpkixcert_tefserver ValidateCertChain c:\tpkixcert_tef\scripts\validatetests.ini Missing_SubjectAltName
535 END_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0020
538 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-CRITEXT-0021
539 //! @SYMTestCaseDesc Test CPKIXCertChain::ValidateL() code fails correctly.
541 //! @SYMTestPriority Critical
542 //! @SYMTestActions 1) Construct the certificate chain.
543 //! 2) Set the supported OID list to the default OIDs and the new one through a call to CPKIXCertChain::SetSupportedCriticalExtensionsL().
544 //! 3) Call CPKIXCertChain::ValidateL(). The default OID value for KInhibitAnyPolicy is not set.
545 //! 4) Ensure the correct error value is returned
546 //! 5) Cleanup the certificate chain and utility classes.
547 //! @SYMTestExpectedResults The validation should return with EUnrecognisedCriticalExtension
549 //! @SYMTestPurpose Ensure we fail correctly for critical extension OIDs encountered that are outside the specified list that we recognise.
550 START_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0021
551 RUN_TEST_STEP 100 tpkixcert_tefserver ValidateCertChain c:\tpkixcert_tef\scripts\validatetests.ini Missing_InhibitAnyPolicy
552 END_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0021
555 //! @SYMTestCaseID SEC-CERTMAN-PKIXCERT-CRITEXT-0022
556 //! @SYMTestCaseDesc Test CPKIXCertChain::ValidateL() code fails correctly.
558 //! @SYMTestPriority Critical
559 //! @SYMTestActions 1) Construct the certificate chain.
560 //! 2) Set the supported OID list to the default OIDs and the new one through a call to CPKIXCertChain::SetSupportedCriticalExtensionsL().
561 //! 3) Call CPKIXCertChain::ValidateL(). The default OID value for KTestOid is not set.
562 //! 4) Ensure the correct error value is returned
563 //! 5) Cleanup the certificate chain and utility classes.
564 //! @SYMTestExpectedResults The validation should return with EUnrecognisedCriticalExtension
566 //! @SYMTestPurpose Ensure we fail correctly for critical extension OIDs encountered that are outside the specified list that we recognise.
567 START_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0022
568 RUN_TEST_STEP 100 tpkixcert_tefserver ValidateCertChain c:\tpkixcert_tef\scripts\validatetests.ini Missing_TestOid
569 END_TESTCASE SEC-CERTMAN-PKIXCERT-CRITEXT-0022