Lines Matching refs:template

22 /* Define static key template values */
40 CK_ATTRIBUTE template[50];
155 /* fill the search template */
159 template[0].type = CKA_TOKEN;
160 template[0].pValue = &truevalue;
161 template[0].ulValueLen = sizeof (truevalue);
162 template[1].type = CKA_CLASS;
163 template[1].pValue = &kclass;
164 template[1].ulValueLen = sizeof (kclass);
165 template[2].type = CKA_LABEL;
166 template[2].pValue = label;
167 template[2].ulValueLen = strlen(label);
170 rv = C_FindObjectsInit(hSession, template, 3);
241 template[0].type = CKA_TOKEN;
242 template[0].pValue = &truevalue;
243 template[0].ulValueLen = sizeof (truevalue);
244 template[1].type = CKA_CLASS;
245 template[1].pValue = &kclass;
246 template[1].ulValueLen = sizeof (kclass);
247 template[2].type = CKA_LABEL;
248 template[2].pValue = label;
249 template[2].ulValueLen = strlen(label);
250 template[3].type = CKA_ID;
251 template[3].pValue = new_id;
252 template[3].ulValueLen = sizeof (new_id);
253 template[4].type = CKA_KEY_TYPE;
254 template[4].pValue = &ktype;
255 template[4].ulValueLen = sizeof (ktype);
256 template[5].type = CKA_ENCRYPT;
257 template[5].pValue = &truevalue;
258 template[5].ulValueLen = sizeof (truevalue);
259 template[6].type = CKA_VERIFY;
260 template[6].pValue = &truevalue;
261 template[6].ulValueLen = sizeof (truevalue);
262 template[7].type = CKA_VERIFY_RECOVER;
263 template[7].pValue = &truevalue;
264 template[7].ulValueLen = sizeof (truevalue);
265 template[8].type = CKA_MODULUS;
266 template[8].pValue = data[0];
267 template[8].ulValueLen = BN_num_bytes(rsa->n);
268 template[9].type = CKA_PUBLIC_EXPONENT;
269 template[9].pValue = data[1];
270 template[9].ulValueLen = BN_num_bytes(rsa->e);
272 rv = C_CreateObject(hSession, template, 10, &key);
281 template[0].type = CKA_TOKEN;
282 template[0].pValue = &truevalue;
283 template[0].ulValueLen = sizeof (truevalue);
284 template[1].type = CKA_CLASS;
285 template[1].pValue = &kclass;
286 template[1].ulValueLen = sizeof (kclass);
287 template[2].type = CKA_LABEL;
288 template[2].pValue = label;
289 template[2].ulValueLen = strlen(label);
290 template[3].type = CKA_ID;
291 template[3].pValue = new_id;
292 template[3].ulValueLen = sizeof (new_id);
293 template[4].type = CKA_KEY_TYPE;
294 template[4].pValue = &ktype;
295 template[4].ulValueLen = sizeof (ktype);
296 template[5].type = CKA_SENSITIVE;
297 template[5].pValue = &falsevalue;
298 template[5].ulValueLen = sizeof (falsevalue);
299 template[6].type = CKA_EXTRACTABLE;
300 template[6].pValue = &truevalue;
301 template[6].ulValueLen = sizeof (truevalue);
302 template[7].type = CKA_DECRYPT;
303 template[7].pValue = &truevalue;
304 template[7].ulValueLen = sizeof (truevalue);
305 template[8].type = CKA_SIGN;
306 template[8].pValue = &truevalue;
307 template[8].ulValueLen = sizeof (truevalue);
308 template[9].type = CKA_SIGN_RECOVER;
309 template[9].pValue = &truevalue;
310 template[9].ulValueLen = sizeof (truevalue);
311 template[10].type = CKA_MODULUS;
312 template[10].pValue = data[0];
313 template[10].ulValueLen = BN_num_bytes(rsa->n);
314 template[11].type = CKA_PUBLIC_EXPONENT;
315 template[11].pValue = data[1];
316 template[11].ulValueLen = BN_num_bytes(rsa->e);
317 template[12].type = CKA_PRIVATE_EXPONENT;
318 template[12].pValue = data[2];
319 template[12].ulValueLen = BN_num_bytes(rsa->d);
320 template[13].type = CKA_PRIME_1;
321 template[13].pValue = data[3];
322 template[13].ulValueLen = BN_num_bytes(rsa->p);
323 template[14].type = CKA_PRIME_2;
324 template[14].pValue = data[4];
325 template[14].ulValueLen = BN_num_bytes(rsa->q);
326 template[15].type = CKA_EXPONENT_1;
327 template[15].pValue = data[5];
328 template[15].ulValueLen = BN_num_bytes(rsa->dmp1);
329 template[16].type = CKA_EXPONENT_2;
330 template[16].pValue = data[6];
331 template[16].ulValueLen = BN_num_bytes(rsa->dmq1);
332 template[17].type = CKA_COEFFICIENT;
333 template[17].pValue = data[7];
334 template[17].ulValueLen = BN_num_bytes(rsa->iqmp);
336 rv = C_CreateObject(hSession, template, 18, &key);