Lines Matching refs:template

289 	/* template for creating generic secret key object */
290 CK_ATTRIBUTE template[NUM_SECRETKEY_ATTRS];
317 template[i].type = CKA_CLASS;
318 template[i].pValue = &objclass;
319 template[i].ulValueLen = sizeof (objclass);
328 template[i].type = CKA_KEY_TYPE;
329 template[i].pValue = &keytype;
330 template[i].ulValueLen = sizeof (keytype);
342 template[i].type = mapping[j].attr;
343 template[i].ulValueLen = sizeof (falsevalue);
345 template[i].pValue = &truevalue;
347 template[i].pValue = &falsevalue;
353 template[i].type = CKA_TOKEN;
354 template[i].pValue = &falsevalue;
355 template[i].ulValueLen = sizeof (falsevalue);
359 template[i].type = CKA_VALUE;
360 template[i].pValue = (CK_VOID_PTR)rawkey;
361 template[i].ulValueLen = (CK_ULONG)rawkey_len;
364 rv = C_CreateObject(hSession, template, i, obj);
387 CK_ATTRIBUTE template[NUM_SECRETKEY_ATTRS];
453 template[i].type = CKA_CLASS;
454 template[i].pValue = &objclass;
455 template[i].ulValueLen = sizeof (objclass);
459 template[i].type = CKA_KEY_TYPE;
460 template[i].pValue = &key_type;
461 template[i].ulValueLen = sizeof (key_type);
465 template[i].type = CKA_TOKEN;
466 template[i].pValue = &falsevalue;
467 template[i].ulValueLen = sizeof (falsevalue);
472 template[i].type = CKA_VALUE_LEN;
473 template[i].pValue = &key_len;
474 template[i].ulValueLen = sizeof (key_len);
485 template[i].type = mapping[j].attr;
486 template[i].pValue = (key_flags & ((mapping[j]).flag)) ?
488 template[i].ulValueLen = sizeof (falsevalue);
492 rv = C_GenerateKey(hSession, &mechanism, template, i, obj);
511 CK_ATTRIBUTE template;
520 template.type = CKA_VALUE;
521 template.pValue = NULL;
522 template.ulValueLen = 0;
525 rv = C_GetAttributeValue(hSession, obj, &template, 1);
530 template.pValue = malloc(template.ulValueLen);
531 if (template.pValue == NULL) {
536 rv = C_GetAttributeValue(hSession, obj, &template, 1);
538 free(template.pValue);
550 *rawkey = template.pValue;
551 *rawkey_len = template.ulValueLen;