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 |
|
18 PRINT Client Sid support tests... |
|
19 |
|
20 // Prepare a clone of TAuthSvr to possess authserver's SID. |
|
21 // This is required for modifying the authserver's central repository file. |
|
22 // This clone must be deleted at the end of the test. |
|
23 |
|
24 RUN_PROGRAM 100 SETCAP tAuthSvr.exe 188b0 -SID 102740FC tAuthSvr_new.exe |
|
25 |
|
26 // Prepare a clone of TAuthSvr without ReadUserData capability. |
|
27 // This clone must be deleted at the end of the test. |
|
28 |
|
29 RUN_PROGRAM 100 SETCAP tAuthSvr.exe 108b0 tAuthSvr1.exe |
|
30 |
|
31 LOAD_SUITE tAuthSvr |
|
32 LOAD_SUITE tAuthSvr_new |
|
33 LOAD_SUITE tAuthSvr1 |
|
34 |
|
35 // This test must be executed in order to set the default plugin, else authserver will never start. |
|
36 |
|
37 RUN_UTILS DeleteFile C:\pinplugin_inactive.txt |
|
38 RUN_TEST_STEP_RESULT 0 100 tAuthSvr_new INIT_CENREP c:\tauth\tAuthSvr\scripts\tauthsvr2.ini defaultplugin |
|
39 RUN_UTILS DeleteFile C:\t_pinplugindlg_in.dat |
|
40 RUN_UTILS DeleteFile C:\t_pinplugindlg_out.dat |
|
41 |
|
42 //// |
|
43 //! @SYMTestCaseID SEC-AUT-CLIENTSIDSUPPORT-0001 |
|
44 //! @SYMTestCaseDesc When a client Sid is non-zero, the same must be used to generate the protection key |
|
45 //! of an identity. |
|
46 //! @SYMREQ REQ11236 |
|
47 //! @SYMTestPriority Medium |
|
48 //! @SYMTestActions Have a default plugin defined, which is active, and a second one which is active as well |
|
49 //! use a client that has ReadUserData capability to connect to the AuthServer. |
|
50 //! |
|
51 //! Successfully register a 2nd identity while using a specified PIN input |
|
52 //! Authenticate using the same PIN input so that the identity to be trained is one |
|
53 //! that has been previously trained.Store the Identity obtained as a result of authentication. |
|
54 //! |
|
55 //! Then call the Train() function, giving a different input. Attempt to authenticate, |
|
56 //! giving the new input.Store the identity obtained as a result of authentication. |
|
57 //! |
|
58 //! Generate a protection key using the key of the identity resulting from the first |
|
59 //! authentication with the client sid and compare with the identity key obtained from |
|
60 //! second authentication. |
|
61 //! |
|
62 //! @SYMTestExpectedResults The authentication, registration and retrain are successful. Protection key generated |
|
63 //! by the identity resulting from first authentication must be the same as the protection key |
|
64 //! of the identity resulting from second authentication. |
|
65 //! @SYMDevelopedForRelease Diran |
|
66 //! |
|
67 START_TESTCASE SEC-AUT-CLIENTSIDSUPPORT-0001 |
|
68 RUN_TEST_STEP_RESULT 0 100 tAuthSvr REMOVE_DBS |
|
69 RUN_TEST_STEP_RESULT 0 100 tAuthSvr REG_IDENTITY c:\tauth\tAuthSvr\scripts\tclientsidsupport.ini Test0001 |
|
70 RUN_TEST_STEP_RESULT 0 100 tAuthSvr CLIENT_SID_CHECK c:\tauth\tAuthSvr\scripts\tclientsidsupport.ini Test0002 |
|
71 END_TESTCASE SEC-AUT-CLIENTSIDSUPPORT-0001 |
|
72 |
|
73 |
|
74 //// |
|
75 //! @SYMTestCaseID SEC-AUT-CLIENTSIDSUPPORT-0002 |
|
76 //! @SYMTestCaseDesc When a client Sid is zero, the calling application's sid must be used to generate the |
|
77 //! protection key of an identity. |
|
78 //! @SYMREQ REQ11236 |
|
79 //! @SYMTestPriority Medium |
|
80 //! @SYMTestActions Have a default plugin defined, which is active, and a second one which is active as well |
|
81 //! use a client that has ReadUserData capability to connect to the AuthServer. |
|
82 //! |
|
83 //! Successfully register a 2nd identity while using a specified PIN input |
|
84 //! Authenticate using the same PIN input so that the identity to be trained is one |
|
85 //! that has been previously trained.Store the Identity obtained as a result of authentication. |
|
86 //! |
|
87 //! Then call the Train() function, giving a different input. Attempt to authenticate, |
|
88 //! giving the new input.Store the identity obtained as a result of authentication. |
|
89 //! |
|
90 //! Generate a protection key using the key of the identity resulting from the first |
|
91 //! authentication with the client sid of the calling application and compare with the |
|
92 //! identity key obtained from second authentication. |
|
93 //! |
|
94 //! @SYMTestExpectedResults The authentication, registration and retrain are successful. Protection key generated |
|
95 //! by the identity resulting from first authentication must be the same as the protection key |
|
96 //! of the identity resulting from second authentication. |
|
97 //! @SYMDevelopedForRelease Diran |
|
98 //! |
|
99 START_TESTCASE SEC-AUT-CLIENTSIDSUPPORT-0002 |
|
100 RUN_TEST_STEP_RESULT 0 100 tAuthSvr REMOVE_DBS |
|
101 RUN_TEST_STEP_RESULT 0 100 tAuthSvr REG_IDENTITY c:\tauth\tAuthSvr\scripts\tclientsidsupport.ini Test0001 |
|
102 RUN_TEST_STEP_RESULT 0 100 tAuthSvr CLIENT_SID_CHECK c:\tauth\tAuthSvr\scripts\tclientsidsupport.ini Test0003 |
|
103 END_TESTCASE SEC-AUT-CLIENTSIDSUPPORT-0002 |
|
104 |
|
105 |
|
106 //// |
|
107 //! @SYMTestCaseID SEC-AUT-CLIENTSIDSUPPORT-0003 |
|
108 //! @SYMTestCaseDesc When a client sid is non-zero and is not the same as the calling application's SID, |
|
109 //! a call to authenticate method fails if the calling application doesn't |
|
110 //! possess ReadUserData capability. |
|
111 //! @SYMREQ REQ11236 |
|
112 //! @SYMTestPriority Medium |
|
113 //! @SYMTestActions Have a default plugin defined, which is active, and a second one which is active as well |
|
114 //! use a client that does not have ReadUserData capability to connect to the AuthServer. |
|
115 //! |
|
116 //! Successfully register a 2nd identity while using a specified PIN input |
|
117 //! Authenticate using the same PIN input so that the identity to be trained is one |
|
118 //! that has been previously trained.Authentication fails with KErrPermissionDenied, |
|
119 //! since the calling appliction doesn't possess ReadUserData capability. |
|
120 //! Authentication must fail with KErrPermissionDenied. |
|
121 //! @SYMDevelopedForRelease Diran |
|
122 //! |
|
123 START_TESTCASE SEC-AUT-CLIENTSIDSUPPORT-0003 |
|
124 RUN_TEST_STEP_RESULT 0 100 tAuthSvr REMOVE_DBS |
|
125 RUN_TEST_STEP_RESULT 0 100 tAuthSvr REG_IDENTITY c:\tauth\tAuthSvr\scripts\tclientsidsupport.ini Test0001 |
|
126 RUN_TEST_STEP !Error=-46 100 tAuthSvr1 CLIENT_SID_CHECK c:\tauth\tAuthSvr\scripts\tclientsidsupport.ini Test0002 |
|
127 END_TESTCASE SEC-AUT-CLIENTSIDSUPPORT-0003 |
|
128 |
|
129 //// |
|
130 //! @SYMTestCaseID SEC-AUT-CLIENTSIDSUPPORT-0004 |
|
131 //! @SYMTestCaseDesc When a client sid is zero, a call to authenticate method succeeds even if the calling |
|
132 //! application doesn't have ReadUserData capability. |
|
133 //! @SYMREQ REQ11236 |
|
134 //! @SYMTestPriority Medium |
|
135 //! @SYMTestActions Have a default plugin defined, which is active, and a second one which is active as well |
|
136 //! use a client that doesn't possess ReadUserData capability to connect to the AuthServer. |
|
137 //! |
|
138 //! Successfully register a 2nd identity while using a specified PIN input |
|
139 //! Authenticate using the same PIN input so that the identity to be trained is one |
|
140 //! that has been previously trained.Store the Identity obtained as a result of authentication. |
|
141 //! |
|
142 //! Then call the Train() function, giving a different input. Attempt to authenticate, |
|
143 //! giving the new input.Store the identity obtained as a result of authentication. |
|
144 //! |
|
145 //! Generate a protection key using the key of the identity resulting from the first |
|
146 //! authentication with the client sid of the calling application and compare with the |
|
147 //! identity key obtained from second authentication. |
|
148 //! |
|
149 //! @SYMTestExpectedResults The authentication, registration and retrain are successful. Protection key generated |
|
150 //! by the identity resulting from first authentication must be the same as the protection key |
|
151 //! of the identity resulting from second authentication. |
|
152 //! @SYMDevelopedForRelease Diran |
|
153 //! |
|
154 |
|
155 START_TESTCASE SEC-AUT-CLIENTSIDSUPPORT-0004 |
|
156 RUN_TEST_STEP_RESULT 0 100 tAuthSvr REMOVE_DBS |
|
157 RUN_TEST_STEP_RESULT 0 100 tAuthSvr REG_IDENTITY c:\tauth\tAuthSvr\scripts\tclientsidsupport.ini Test0001 |
|
158 RUN_TEST_STEP_RESULT 0 100 tAuthSvr1 CLIENT_SID_CHECK c:\tauth\tAuthSvr\scripts\tclientsidsupport.ini Test0003 |
|
159 END_TESTCASE SEC-AUT-CLIENTSIDSUPPORT-0004 |
|
160 |
|
161 //// |
|
162 //! @SYMTestCaseID SEC-AUT-CLIENTSIDSUPPORT-0005 |
|
163 //! @SYMTestCaseDesc When a client sid is non-zero and is the same as the calling application's sid, |
|
164 //! , a call to authenticate method succeeds even if the calling application doesn't |
|
165 //! have ReadUserData capability. |
|
166 //! @SYMREQ REQ11236 |
|
167 //! @SYMTestPriority Medium |
|
168 //! @SYMTestActions Have a default plugin defined, which is active, and a second one which is active as well |
|
169 //! use a client that doesn't possess ReadUserData capability to connect to the AuthServer. |
|
170 //! |
|
171 //! Successfully register a 2nd identity while using a specified PIN input |
|
172 //! Authenticate using the same PIN input so that the identity to be trained is one |
|
173 //! that has been previously trained.Store the Identity obtained as a result of authentication. |
|
174 //! |
|
175 //! Then call the Train() function, giving a different input. Attempt to authenticate, |
|
176 //! giving the new input.Store the identity obtained as a result of authentication. |
|
177 //! |
|
178 //! Generate a protection key using the key of the identity resulting from the first |
|
179 //! authentication with the client sid of the calling application and compare with the |
|
180 //! identity key obtained from second authentication. |
|
181 //! |
|
182 //! @SYMTestExpectedResults The authentication, registration and retrain are successful. Protection key generated |
|
183 //! by the identity resulting from first authentication must be the same as the protection key |
|
184 //! of the identity resulting from second authentication. |
|
185 //! @SYMDevelopedForRelease Diran |
|
186 //! |
|
187 |
|
188 START_TESTCASE SEC-AUT-CLIENTSIDSUPPORT-0005 |
|
189 RUN_TEST_STEP_RESULT 0 100 tAuthSvr REMOVE_DBS |
|
190 RUN_TEST_STEP_RESULT 0 100 tAuthSvr REG_IDENTITY c:\tauth\tAuthSvr\scripts\tclientsidsupport.ini Test0001 |
|
191 RUN_TEST_STEP_RESULT 0 100 tAuthSvr1 CLIENT_SID_CHECK c:\tauth\tAuthSvr\scripts\tclientsidsupport.ini Test0004 |
|
192 END_TESTCASE SEC-AUT-CLIENTSIDSUPPORT-0005 |
|
193 |
|
194 // This is to shut down the auth server |
|
195 DELAY 5000 |
|