|
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 "Symbian Foundation License v1.0" |
|
6 // which accompanies this distribution, and is available |
|
7 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
|
8 // |
|
9 // Initial Contributors: |
|
10 // Nokia Corporation - initial contribution. |
|
11 // |
|
12 // Contributors: |
|
13 // |
|
14 // Description: |
|
15 // |
|
16 |
|
17 START_TESTCASE SEC-CERTMAN-OOM2-CERTSTORE-0001 |
|
18 |
|
19 //! @SYMTestCaseID SEC-CERTMAN-OOM2-CERTSTORE-0001 |
|
20 |
|
21 //! @SYMTestCaseDesc |
|
22 |
|
23 //! OOM tests for unified cert store |
|
24 |
|
25 //! |
|
26 |
|
27 //! |
|
28 |
|
29 //! Setup /////////////////////////////////////////////////////////////////////// |
|
30 |
|
31 //! @SYMTestActions 1) No Test,Opening a CertificateAppInfoManager |
|
32 |
|
33 //! 2) No Test,Adding client A1 |
|
34 |
|
35 //! 3) No Test,Adding client A2 |
|
36 |
|
37 //! 4) No Test,Adding client A3 |
|
38 |
|
39 //! 5) No Test,Adding client A4 |
|
40 |
|
41 //! 6) No Test,Deleting the CertificateAppInfoManager |
|
42 |
|
43 //! 7) Opening a writable certificate store manager |
|
44 |
|
45 //! 8) Deleting all certs |
|
46 |
|
47 //! 9) Import a RSA key rsacertkey1 |
|
48 |
|
49 //! 10) Start OOM testing |
|
50 |
|
51 RUN_TEST_STEP -1 CTestHandler initappmanager |
|
52 |
|
53 RUN_TEST_STEP -1 CTestHandler addclient oom2.ini SEC-CERTMAN-OOM2-0001-002 |
|
54 |
|
55 RUN_TEST_STEP -1 CTestHandler addclient oom2.ini SEC-CERTMAN-OOM2-0001-003 |
|
56 |
|
57 RUN_TEST_STEP -1 CTestHandler addclient oom2.ini SEC-CERTMAN-OOM2-0001-004 |
|
58 |
|
59 RUN_TEST_STEP -1 CTestHandler addclient oom2.ini SEC-CERTMAN-OOM2-0001-005 |
|
60 |
|
61 RUN_TEST_STEP -1 CTestHandler deleteappmanager |
|
62 |
|
63 RUN_TEST_STEP -1 CTestHandler init oom2.ini SEC-CERTMAN-OOM2-0001-007 |
|
64 |
|
65 RUN_TEST_STEP -1 CTestHandler deletecert oom2.ini SEC-CERTMAN-OOM2-0001-008 |
|
66 |
|
67 RUN_TEST_STEP -1 CTestHandler importkey oom2.ini SEC-CERTMAN-OOM2-0001-009 |
|
68 |
|
69 RUN_TEST_STEP -1 CTestHandler startmemfailure |
|
70 |
|
71 END_TESTCASE SEC-CERTMAN-OOM2-CERTSTORE-0001 |
|
72 |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 START_TESTCASE SEC-CERTMAN-OOM2-0002 |
|
78 |
|
79 //! @SYMTestCaseID SEC-CERTMAN-OOM2-0002 |
|
80 |
|
81 //! @SYMTestCaseDesc Add certs /////////////////////////////////////////////////////////////////// |
|
82 |
|
83 //! @SYMTestActions 1) Add X509 CA certificate CAX1 |
|
84 |
|
85 //! 2) Add WTLS CA certificate CAW1 |
|
86 |
|
87 //! 3) Add X509 user certificate rsacert1 |
|
88 |
|
89 RUN_TEST_STEP -1 CTestHandler addcert oom2.ini SEC-CERTMAN-OOM2-0002-001 |
|
90 |
|
91 RUN_TEST_STEP -1 CTestHandler addcert oom2.ini SEC-CERTMAN-OOM2-0002-002 |
|
92 |
|
93 RUN_TEST_STEP -1 CTestHandler addcert oom2.ini SEC-CERTMAN-OOM2-0002-003 |
|
94 |
|
95 END_TESTCASE SEC-CERTMAN-OOM2-0002 |
|
96 |
|
97 |
|
98 |
|
99 |
|
100 |
|
101 START_TESTCASE SEC-CERTMAN-OOM2-0003 |
|
102 |
|
103 //! @SYMTestCaseID SEC-CERTMAN-OOM2-0003 |
|
104 |
|
105 //! @SYMTestCaseDesc List certs ////////////////////////////////////////////////////////////////// |
|
106 |
|
107 //! @SYMTestActions 1) List CA certificates |
|
108 |
|
109 //! 2) List user certificates |
|
110 |
|
111 //! 3) List user certificates filtered by key usage |
|
112 |
|
113 //! 4) List user certificates filtered by key usage |
|
114 |
|
115 //! 5) List certificates filtered by Issuer DN |
|
116 |
|
117 //! 6) List certificates filtered by Issuer DN |
|
118 |
|
119 //! 7) List certificates filtered by Issuer DN |
|
120 |
|
121 RUN_TEST_STEP -1 CTestHandler listcert oom2.ini SEC-CERTMAN-OOM2-0003-001 |
|
122 |
|
123 RUN_TEST_STEP -1 CTestHandler listcert oom2.ini SEC-CERTMAN-OOM2-0003-002 |
|
124 |
|
125 RUN_TEST_STEP -1 CTestHandler listcert oom2.ini SEC-CERTMAN-OOM2-0003-003 |
|
126 |
|
127 RUN_TEST_STEP -1 CTestHandler listcert oom2.ini SEC-CERTMAN-OOM2-0003-004 |
|
128 |
|
129 RUN_TEST_STEP -1 CTestHandler listcert oom2.ini SEC-CERTMAN-OOM2-0003-005 |
|
130 |
|
131 RUN_TEST_STEP -1 CTestHandler listcert oom2.ini SEC-CERTMAN-OOM2-0003-006 |
|
132 |
|
133 RUN_TEST_STEP -1 CTestHandler listcert oom2.ini SEC-CERTMAN-OOM2-0003-007 |
|
134 |
|
135 END_TESTCASE SEC-CERTMAN-OOM2-0003 |
|
136 |
|
137 |
|
138 |
|
139 |
|
140 |
|
141 START_TESTCASE SEC-CERTMAN-OOM2-0004 |
|
142 |
|
143 //! @SYMTestCaseID SEC-CERTMAN-OOM2-0004 |
|
144 |
|
145 //! @SYMTestCaseDesc Applications and trust ////////////////////////////////////////////////////// |
|
146 |
|
147 //! @SYMTestActions 1) Set applications to the CAX1 certificate |
|
148 |
|
149 //! 2) Get applications for CAX1 |
|
150 |
|
151 //! 3) Set the trust for CAX1 |
|
152 |
|
153 //! 4) Get the trust for CAX1 |
|
154 |
|
155 RUN_TEST_STEP -1 CTestHandler setapplications oom2.ini SEC-CERTMAN-OOM2-0004-001 |
|
156 |
|
157 RUN_TEST_STEP -1 CTestHandler getapplications oom2.ini SEC-CERTMAN-OOM2-0004-002 |
|
158 |
|
159 RUN_TEST_STEP -1 CTestHandler settrust oom2.ini SEC-CERTMAN-OOM2-0004-003 |
|
160 |
|
161 RUN_TEST_STEP -1 CTestHandler gettrusters oom2.ini SEC-CERTMAN-OOM2-0004-004 |
|
162 |
|
163 END_TESTCASE SEC-CERTMAN-OOM2-0004 |
|
164 |
|
165 |
|
166 |
|
167 |
|
168 |
|
169 START_TESTCASE SEC-CERTMAN-OOM2-0005 |
|
170 |
|
171 //! @SYMTestCaseID SEC-CERTMAN-OOM2-0005 |
|
172 |
|
173 //! @SYMTestCaseDesc Delete certs //////////////////////////////////////////////////////////////// |
|
174 |
|
175 //! @SYMTestActions 1) Deleting all certs |
|
176 |
|
177 RUN_TEST_STEP -1 CTestHandler deletecert oom2.ini SEC-CERTMAN-OOM2-0005-001 |
|
178 |
|
179 END_TESTCASE SEC-CERTMAN-OOM2-0005 |
|
180 |
|
181 |
|
182 |
|
183 |
|
184 |
|
185 START_TESTCASE SEC-CERTMAN-OOM2-0006 |
|
186 |
|
187 //! @SYMTestCaseID SEC-CERTMAN-OOM2-0006 |
|
188 |
|
189 //! @SYMTestCaseDesc Cleanup ///////////////////////////////////////////////////////////////////// |
|
190 |
|
191 //! @SYMTestActions 1) None |
|
192 |
|
193 //! 2) Deleting the writable certificate store manager |
|
194 |
|
195 //! 3) No Test,Opening a CertificateAppInfoManager |
|
196 |
|
197 //! 4) No Test,Deleting the client A1 |
|
198 |
|
199 //! 5) No Test,Deleting the client A2 |
|
200 |
|
201 //! 6) No Test,Deleting the client A3 |
|
202 |
|
203 //! 7) No Test,Deleting the client A4 |
|
204 |
|
205 //! 8) No Test,Deleting the CertificateAppInfoManager |
|
206 |
|
207 RUN_TEST_STEP -1 CTestHandler stopmemfailure |
|
208 |
|
209 RUN_TEST_STEP -1 CTestHandler delete |
|
210 |
|
211 RUN_TEST_STEP -1 CTestHandler initappmanager |
|
212 |
|
213 RUN_TEST_STEP -1 CTestHandler removeclient oom2.ini SEC-CERTMAN-OOM2-0006-004 |
|
214 |
|
215 RUN_TEST_STEP -1 CTestHandler removeclient oom2.ini SEC-CERTMAN-OOM2-0006-005 |
|
216 |
|
217 RUN_TEST_STEP -1 CTestHandler removeclient oom2.ini SEC-CERTMAN-OOM2-0006-006 |
|
218 |
|
219 RUN_TEST_STEP -1 CTestHandler removeclient oom2.ini SEC-CERTMAN-OOM2-0006-007 |
|
220 |
|
221 RUN_TEST_STEP -1 CTestHandler deleteappmanager |
|
222 |
|
223 END_TESTCASE SEC-CERTMAN-OOM2-0006 |
|
224 |
|
225 |
|
226 |
|
227 |
|
228 |