|
1 //////////////////////////////////////////////////////////////////////////////////// |
|
2 // Testing hardware token implementation |
|
3 //////////////////////////////////////////////////////////////////////////////////// |
|
4 |
|
5 <action> |
|
6 <actionname>Delete keystore data file</actionname> |
|
7 <actiontype>deletekeystoredata</actiontype> |
|
8 <actionbody> |
|
9 </actionbody> |
|
10 <actionresult> |
|
11 <return>KErrNone</return> |
|
12 </actionresult> |
|
13 </action> |
|
14 |
|
15 <action> |
|
16 <actionname>Retrieving label of a particular key store</actionname> |
|
17 <actiontype>init</actiontype> |
|
18 <actionbody> |
|
19 <mode>manager</mode> |
|
20 <CheckKeyStoreLabel>1</CheckKeyStoreLabel> |
|
21 <keystoreindex>3</keystoreindex> |
|
22 <keystorelabel>Hardware plugin implementation</keystorelabel> |
|
23 </actionbody> |
|
24 <actionresult> |
|
25 <return>KErrNone</return> |
|
26 </actionresult> |
|
27 </action> |
|
28 |
|
29 <action> |
|
30 <actionname>delete keys</actionname> |
|
31 <actiontype>deletekeys</actiontype> |
|
32 <actionbody></actionbody> |
|
33 <actionresult> |
|
34 <return>KErrNone</return> |
|
35 </actionresult> |
|
36 </action> |
|
37 |
|
38 <action> |
|
39 <actionname>List Keys</actionname> |
|
40 <actiontype>listallkeys</actiontype> |
|
41 <actionbody> |
|
42 <listcount>2</listcount> |
|
43 <foundkey>ecckey</foundkey> |
|
44 <foundkey>ecckey2</foundkey> |
|
45 </actionbody> |
|
46 <actionresult> |
|
47 <return>KErrNone</return> |
|
48 </actionresult> |
|
49 </action> |
|
50 |
|
51 <action> |
|
52 <actionname>Open a key for signing</actionname> |
|
53 <actiontype>open</actiontype> |
|
54 <actionbody> |
|
55 <hwtype>1</hwtype> |
|
56 <operationtype>sign</operationtype> |
|
57 <keylabel>ecckey</keylabel> |
|
58 <open>ECC</open> |
|
59 </actionbody> |
|
60 <actionresult> |
|
61 <return>KErrNone</return> |
|
62 </actionresult> |
|
63 </action> |
|
64 |
|
65 <action> |
|
66 <actionname>Open a key for decryption</actionname> |
|
67 <actiontype>open</actiontype> |
|
68 <actionbody> |
|
69 <hwtype>1</hwtype> |
|
70 <operationtype>decrypt</operationtype> |
|
71 <keylabel>ecckey</keylabel> |
|
72 <open>ECC</open> |
|
73 </actionbody> |
|
74 <actionresult> |
|
75 <return>KErrNone</return> |
|
76 </actionresult> |
|
77 </action> |
|
78 |
|
79 <action> |
|
80 <actionname>Open a key for signing</actionname> |
|
81 <actiontype>sign</actiontype> |
|
82 <actionbody> |
|
83 <hwtype>0</hwtype> |
|
84 <operationtype>sign</operationtype> |
|
85 <keylabel>ecckey</keylabel> |
|
86 <open>ECC</open> |
|
87 <keystorelabel>Hardware plugin implementation</keystorelabel> |
|
88 <text>sample text</text> |
|
89 </actionbody> |
|
90 <actionresult> |
|
91 <return>KErrNone</return> |
|
92 </actionresult> |
|
93 </action> |
|
94 |
|
95 <action> |
|
96 <actionname>Open a key for decryption</actionname> |
|
97 <actiontype>decrypt</actiontype> |
|
98 <actionbody> |
|
99 <hwtype>0</hwtype> |
|
100 <operationtype>decrypt</operationtype> |
|
101 <keylabel>ecckey2</keylabel> |
|
102 <open>ECC</open> |
|
103 <keystorelabel>Hardware plugin implementation</keystorelabel> |
|
104 <text>sample text</text> |
|
105 </actionbody> |
|
106 <actionresult> |
|
107 <return>KErrNone</return> |
|
108 </actionresult> |
|
109 </action> |
|
110 |
|
111 <action> |
|
112 <actionname>Open a key for signing</actionname> |
|
113 <actiontype>sign</actiontype> |
|
114 <actionbody> |
|
115 <hwtype>1</hwtype> |
|
116 <operationtype>sign</operationtype> |
|
117 <keylabel>ecckey</keylabel> |
|
118 <open>ECC</open> |
|
119 <keystorelabel>Hardware plugin implementation</keystorelabel> |
|
120 <text>sample text</text> |
|
121 </actionbody> |
|
122 <actionresult> |
|
123 <return>KErrNone</return> |
|
124 </actionresult> |
|
125 </action> |
|
126 |
|
127 <action> |
|
128 <actionname>Open a key for decryption</actionname> |
|
129 <actiontype>decrypt</actiontype> |
|
130 <actionbody> |
|
131 <hwtype>1</hwtype> |
|
132 <operationtype>decrypt</operationtype> |
|
133 <keylabel>ecckey2</keylabel> |
|
134 <open>ECC</open> |
|
135 <keystorelabel>Hardware plugin implementation</keystorelabel> |
|
136 <text>sample text</text> |
|
137 </actionbody> |
|
138 <actionresult> |
|
139 <return>KErrNone</return> |
|
140 </actionresult> |
|
141 </action> |
|
142 |
|
143 <action> |
|
144 <actionname>List Keys</actionname> |
|
145 <actiontype>listkeys</actiontype> |
|
146 <actionbody> |
|
147 <foundkey>ecckey3</foundkey> |
|
148 <listingstatus>fail</listingstatus> |
|
149 </actionbody> |
|
150 <actionresult> |
|
151 <return>KErrNone</return> |
|
152 </actionresult> |
|
153 </action> |
|
154 |
|
155 <action> |
|
156 <actionname>Add a key</actionname> |
|
157 <actiontype>addkey</actiontype> |
|
158 <actionbody> |
|
159 <keyusage>allusagesbutNR</keyusage> |
|
160 <keysize>512</keysize> |
|
161 <keylabel>banana</keylabel> |
|
162 <keyalgorithm>RSA</keyalgorithm> |
|
163 <keyaccesstype>Extractable</keyaccesstype> |
|
164 <keystore>0</keystore> |
|
165 <usekeystore>Hardware plugin implementation</usekeystore> |
|
166 </actionbody> |
|
167 <actionresult> |
|
168 <return>KErrNotSupported</return> |
|
169 </actionresult> |
|
170 </action> |
|
171 |
|
172 <action> |
|
173 <actionname>Get key information</actionname> |
|
174 <actiontype>getkeyinfo</actiontype> |
|
175 <actionbody> |
|
176 <keylabel>ecckey</keylabel> |
|
177 </actionbody> |
|
178 <actionresult> |
|
179 <return>KErrNotSupported</return> |
|
180 </actionresult> |
|
181 </action> |
|
182 |
|
183 <action> |
|
184 <actionname>Open a key as a RSA signer</actionname> |
|
185 <actiontype>open</actiontype> |
|
186 <actionbody> |
|
187 <keylabel>ecckey</keylabel> |
|
188 <open>RSA</open> |
|
189 </actionbody> |
|
190 <actionresult> |
|
191 <return>KErrNotSupported</return> |
|
192 </actionresult> |
|
193 </action> |
|
194 |
|
195 <action> |
|
196 <actionname>Open a key as a DSA signer</actionname> |
|
197 <actiontype>open</actiontype> |
|
198 <actionbody> |
|
199 <keylabel>ecckey</keylabel> |
|
200 <open>DSA</open> |
|
201 </actionbody> |
|
202 <actionresult> |
|
203 <return>KErrNotSupported</return> |
|
204 </actionresult> |
|
205 </action> |
|
206 |
|
207 <action> |
|
208 <actionname>Open key for decrypt</actionname> |
|
209 <actiontype>open</actiontype> |
|
210 <actionbody> |
|
211 <keylabel>ecckey</keylabel> |
|
212 <open>Decrypt</open> |
|
213 </actionbody> |
|
214 <actionresult> |
|
215 <return>KErrNotSupported</return> |
|
216 </actionresult> |
|
217 </action> |
|
218 |
|
219 <action> |
|
220 <actionname>Import a key</actionname> |
|
221 <actiontype>importkey</actiontype> |
|
222 <actionbody> |
|
223 <ImportData>pkcs8rsa.001</ImportData> |
|
224 <keyusage>allusagesbutNR</keyusage> |
|
225 <keylabel>ImportHardwareKey</keylabel> |
|
226 <keyaccesstype>NeverExtractable</keyaccesstype> |
|
227 <usekeystore>Hardware plugin implementation</usekeystore> |
|
228 </actionbody> |
|
229 <actionresult> |
|
230 <return>KErrNotSupported</return> |
|
231 </actionresult> |
|
232 </action> |
|
233 |
|
234 <action> |
|
235 <actionname>Import a PKCS5 encrypted RSA key</actionname> |
|
236 <actiontype>importkey</actiontype> |
|
237 <actionbody> |
|
238 <ImportData>encryptPK8rsaDER.txt</ImportData> |
|
239 <keyusage>allusagesbutNR</keyusage> |
|
240 <keylabel>ImportEncryptedHardwareKey</keylabel> |
|
241 <keyaccesstype>NeverExtractable</keyaccesstype> |
|
242 <usekeystore>Hardware plugin implementation</usekeystore> |
|
243 </actionbody> |
|
244 <actionresult> |
|
245 <return>KErrNotSupported</return> |
|
246 </actionresult> |
|
247 </action> |
|
248 |
|
249 <action> |
|
250 <actionname>Export a key</actionname> |
|
251 <actiontype>exportkey</actiontype> |
|
252 <actionbody> |
|
253 <ExportFile>export_hardware_key</ExportFile> |
|
254 <keyusage>Derive</keyusage> |
|
255 <keylabel>ecckey</keylabel> |
|
256 <keyalgorithm>ECC</keyalgorithm> |
|
257 <encrypted>0</encrypted> |
|
258 </actionbody> |
|
259 <actionresult> |
|
260 <return>KErrNotSupported</return> |
|
261 </actionresult> |
|
262 </action> |
|
263 |
|
264 <action> |
|
265 <actionname>Export a key in encrypted format </actionname> |
|
266 <actiontype>exportkey</actiontype> |
|
267 <actionbody> |
|
268 <ExportFile>export_encrypted_hardware_key</ExportFile> |
|
269 <keyusage>Derive</keyusage> |
|
270 <keylabel>ecckey</keylabel> |
|
271 <keyalgorithm>ECC</keyalgorithm> |
|
272 <encrypted>1</encrypted> |
|
273 </actionbody> |
|
274 <actionresult> |
|
275 <return>KErrNotSupported</return> |
|
276 </actionresult> |
|
277 </action> |
|
278 |
|
279 <action> |
|
280 <actionname>Set use policy</actionname> |
|
281 <actiontype>setusepolicy</actiontype> |
|
282 <actionbody> |
|
283 <keylabel>ecckey</keylabel> |
|
284 <policy> |
|
285 <secureid>0x101FFFFF</secureid> |
|
286 <capability>DRM</capability> |
|
287 <capability>ReadUserData</capability> |
|
288 </policy> |
|
289 </actionbody> |
|
290 <actionresult> |
|
291 <return>KErrNotSupported</return> |
|
292 </actionresult> |
|
293 </action> |
|
294 |
|
295 <action> |
|
296 <actionname>Set use policy</actionname> |
|
297 <actiontype>setmanagementpolicy</actiontype> |
|
298 <actionbody> |
|
299 <keylabel>ecckey</keylabel> |
|
300 <policy> |
|
301 <secureid>0x101FFFFF</secureid> |
|
302 <capability>DRM</capability> |
|
303 <capability>ReadUserData</capability> |
|
304 </policy> |
|
305 </actionbody> |
|
306 <actionresult> |
|
307 <return>KErrNotSupported</return> |
|
308 </actionresult> |
|
309 </action> |
|
310 |
|
311 <action> |
|
312 <actionname>Delete a key</actionname> |
|
313 <actiontype>deletekeys</actiontype> |
|
314 <actionbody> |
|
315 <keyalgorithm>ECC</keyalgorithm> |
|
316 <keylabel>ecckey</keylabel> |
|
317 </actionbody> |
|
318 <actionresult> |
|
319 <return>KErrNotSupported</return> |
|
320 </actionresult> |
|
321 </action> |
|
322 |
|
323 <action> |
|
324 <actionname>Closing key store</actionname> |
|
325 <actiontype>delete</actiontype> |
|
326 <actionbody></actionbody> |
|
327 <actionresult> |
|
328 <return>KErrNone</return> |
|
329 </actionresult> |
|
330 </action> |
|
331 |
|
332 <action> |
|
333 <actionname>Sleep 5 seconds</actionname> |
|
334 <actiontype>sleep</actiontype> |
|
335 <actionbody> |
|
336 <seconds>5</seconds> |
|
337 </actionbody> |
|
338 <actionresult> |
|
339 <return>KErrNone</return> |
|
340 </actionresult> |
|
341 </action> |