Lines Matching refs:attr

50 	CK_ATTRIBUTE attr;  in get_master_attributes_by_object()  local
55 attr.type = CKA_CLASS; in get_master_attributes_by_object()
56 attr.pValue = &class; in get_master_attributes_by_object()
57 attr.ulValueLen = sizeof (class); in get_master_attributes_by_object()
59 session->hSession, slot_object->hObject, &attr, 1); in get_master_attributes_by_object()
64 attr.pValue = &subtype; in get_master_attributes_by_object()
65 attr.ulValueLen = sizeof (subtype); in get_master_attributes_by_object()
68 attr.type = CKA_CERTIFICATE_TYPE; in get_master_attributes_by_object()
71 attr.type = CKA_HW_FEATURE_TYPE; in get_master_attributes_by_object()
77 attr.type = CKA_KEY_TYPE; in get_master_attributes_by_object()
86 session->hSession, slot_object->hObject, &attr, 1); in get_master_attributes_by_object()
405 generic_attr_t *attr; in get_master_attributes_by_type() local
407 attr = new_attributes + i; in get_master_attributes_by_type()
409 switch (attr->attribute.ulValueLen) { in get_master_attributes_by_type()
411 attr->attribute.pValue = &attr->generic_ulong; in get_master_attributes_by_type()
414 attr->attribute.pValue = &attr->generic_bbool; in get_master_attributes_by_type()
417 attr->attribute.pValue = attr->generic_data; in get_master_attributes_by_type()
517 generic_attr_t *attr; in dealloc_attributes() local
520 attr = attributes + i; in dealloc_attributes()
528 bzero(attr->attribute.pValue, attr->attribute.ulValueLen); in dealloc_attributes()
530 if (attr->isMalloced) in dealloc_attributes()
531 free(attr->attribute.pValue); in dealloc_attributes()
548 generic_attr_t *attr = NULL; in attribute_set_value() local
556 find_attribute(new_attr->type, attributes, num_attributes, &attr); in attribute_set_value()
557 if (attr == NULL) { in attribute_set_value()
562 if (attr->attribute.ulValueLen >= new_attr->ulValueLen) { in attribute_set_value()
566 bzero((char *)attr->attribute.pValue + new_attr->ulValueLen, in attribute_set_value()
567 attr->attribute.ulValueLen - new_attr->ulValueLen); in attribute_set_value()
569 } else if (new_attr->ulValueLen <= sizeof (attr->generic_data)) { in attribute_set_value()
572 bzero(attr->attribute.pValue, attr->attribute.ulValueLen); in attribute_set_value()
573 if (attr->isMalloced) { in attribute_set_value()
584 free(attr->attribute.pValue); in attribute_set_value()
585 attr->isMalloced = B_FALSE; in attribute_set_value()
588 attr->attribute.pValue = attr->generic_data; in attribute_set_value()
597 bzero(attr->attribute.pValue, attr->attribute.ulValueLen); in attribute_set_value()
598 attr->attribute.pValue = newStorage; in attribute_set_value()
599 attr->isMalloced = B_TRUE; in attribute_set_value()
602 (void) memcpy(attr->attribute.pValue, new_attr->pValue, in attribute_set_value()
604 attr->attribute.ulValueLen = new_attr->ulValueLen; in attribute_set_value()
605 attr->hasValueForClone = B_TRUE; in attribute_set_value()
620 generic_attr_t *attr; in find_attribute() local
625 for (i = 0, attr = attributes; i < num_attributes; i++, attr++) { in find_attribute()
626 if (attr->attribute.type == attrtype) { in find_attribute()
632 *found_attribute = found ? attr : NULL; in find_attribute()