Lines Matching refs:attr

306 	CK_ATTRIBUTE  * attr = NULL;
314 attr = (CK_ATTRIBUTE *)malloc(sizeof (CK_ATTRIBUTE) +
316 if (! attr) {
319 attr->type = pTemplate[i].type;
320 attr->ulValueLen = pTemplate[i].ulValueLen;
322 if (attr->ulValueLen != 0) {
323 attr->pValue = (CK_BYTE *)attr + sizeof (CK_ATTRIBUTE);
324 (void) memcpy(attr->pValue, pTemplate[i].pValue,
325 attr->ulValueLen);
327 attr->pValue = NULL;
329 rc = template_update_attribute(tmpl, attr);
331 free(attr);
423 CK_ATTRIBUTE ** attr)
428 if (! tmpl || ! attr)
436 *attr = a;
443 *attr = NULL;
456 CK_ATTRIBUTE * attr = NULL;
461 tmpl, parselist[i].type, &attr);
464 (void) memcpy(parselist[i].ptr, attr->pValue,
544 CK_ATTRIBUTE * attr;
547 found = template_attribute_find(tmpl, CKA_CLASS, &attr);
603 CK_ATTRIBUTE *attr = (CK_ATTRIBUTE *)node->data;
607 len = sizeof (CK_ATTRIBUTE) + attr->ulValueLen;
613 (void) memcpy(new_attr, attr, len);
648 CK_ATTRIBUTE *attr = (CK_ATTRIBUTE *)node->data;
651 (void) memcpy(ptr, attr, sizeof (CK_ATTRIBUTE) +
652 attr->ulValueLen);
653 ptr += sizeof (CK_ATTRIBUTE) + attr->ulValueLen;
659 attr_32->type = attr->type;
661 if ((attr->type == CKA_CLASS ||
662 attr->type == CKA_KEY_TYPE ||
663 attr->type == CKA_MODULUS_BITS ||
664 attr->type == CKA_VALUE_BITS ||
665 attr->type == CKA_CERTIFICATE_TYPE ||
666 attr->type == CKA_VALUE_LEN) &&
667 attr->ulValueLen != 0) {
675 pVal = (CK_ULONG *)attr->pValue;
682 attr_32->ulValueLen = attr->ulValueLen;
686 if (attr->ulValueLen != 0) {
687 (void) memcpy(ptr, attr->pValue,
688 attr->ulValueLen);
689 ptr += attr->ulValueLen;
833 CK_ATTRIBUTE *attr = (CK_ATTRIBUTE *)tmpl->attribute_list->data;
835 if (attr)
836 free(attr);
859 CK_ATTRIBUTE *attr = (CK_ATTRIBUTE *)node->data;
861 if (attr->type == CKA_CLASS) {
862 *class = *(CK_OBJECT_CLASS *)attr->pValue;
866 if (attr->type == CKA_CERTIFICATE_TYPE)
867 *subclass = *(CK_CERTIFICATE_TYPE *)attr->pValue;
869 if (attr->type == CKA_KEY_TYPE)
870 *subclass = *(CK_KEY_TYPE *)attr->pValue;
896 CK_ATTRIBUTE *attr = (CK_ATTRIBUTE *)node->data;
898 size += sizeof (CK_ATTRIBUTE) + attr->ulValueLen;
916 CK_ATTRIBUTE *attr = (CK_ATTRIBUTE *)node->data;
919 if ((attr->type == CKA_CLASS ||
920 attr->type == CKA_KEY_TYPE ||
921 attr->type == CKA_MODULUS_BITS ||
922 attr->type == CKA_VALUE_BITS ||
923 attr->type == CKA_CERTIFICATE_TYPE ||
924 attr->type == CKA_VALUE_LEN) &&
925 attr->ulValueLen != 0) {
928 size += attr->ulValueLen;
951 CK_ATTRIBUTE * attr = NULL;
962 val = template_attribute_find(tmpl, CKA_SENSITIVE, &attr);
964 val = *(CK_BBOOL *)attr->pValue;
997 CK_ATTRIBUTE *attr = (CK_ATTRIBUTE *)node->data;
999 rc = template_update_attribute(dest, attr);
1078 CK_ATTRIBUTE * attr = NULL;
1086 attr = (CK_ATTRIBUTE *)node->data;
1088 if (new_attr->type == attr->type) {
1089 free(attr);
1106 CK_ATTRIBUTE * attr,
1112 return (data_object_validate_attribute(tmpl, attr, mode));
1115 return (cert_x509_validate_attribute(tmpl, attr, mode));
1118 attr, mode));
1124 attr, mode));
1133 attr, mode));
1141 attr, mode));
1150 attr, mode));
1153 attr, mode));
1178 CK_ATTRIBUTE *attr = (CK_ATTRIBUTE *)node->data;
1180 rc = template_validate_attribute(tmpl, attr, class,
1193 CK_ATTRIBUTE * attr,
1196 if (! tmpl || ! attr) {
1199 switch (attr->type) {