Lines Matching refs:attr

51 	CK_ATTRIBUTE attr;  in get_master_attributes_by_object()  local
56 attr.type = CKA_CLASS; in get_master_attributes_by_object()
57 attr.pValue = &class; in get_master_attributes_by_object()
58 attr.ulValueLen = sizeof (class); in get_master_attributes_by_object()
60 session->hSession, slot_object->hObject, &attr, 1); in get_master_attributes_by_object()
65 attr.pValue = &subtype; in get_master_attributes_by_object()
66 attr.ulValueLen = sizeof (subtype); in get_master_attributes_by_object()
69 attr.type = CKA_CERTIFICATE_TYPE; in get_master_attributes_by_object()
72 attr.type = CKA_HW_FEATURE_TYPE; in get_master_attributes_by_object()
78 attr.type = CKA_KEY_TYPE; in get_master_attributes_by_object()
88 session->hSession, slot_object->hObject, &attr, 1); in get_master_attributes_by_object()
407 generic_attr_t *attr; in get_master_attributes_by_type() local
409 attr = new_attributes + i; in get_master_attributes_by_type()
411 switch (attr->attribute.ulValueLen) { in get_master_attributes_by_type()
413 attr->attribute.pValue = &attr->generic_ulong; in get_master_attributes_by_type()
416 attr->attribute.pValue = &attr->generic_bbool; in get_master_attributes_by_type()
419 attr->attribute.pValue = attr->generic_data; in get_master_attributes_by_type()
519 generic_attr_t *attr; in dealloc_attributes() local
522 attr = attributes + i; in dealloc_attributes()
530 bzero(attr->attribute.pValue, attr->attribute.ulValueLen); in dealloc_attributes()
532 if (attr->isMalloced) in dealloc_attributes()
533 free(attr->attribute.pValue); in dealloc_attributes()
550 generic_attr_t *attr = NULL; in attribute_set_value() local
558 find_attribute(new_attr->type, attributes, num_attributes, &attr); in attribute_set_value()
559 if (attr == NULL) { in attribute_set_value()
564 if (attr->attribute.ulValueLen >= new_attr->ulValueLen) { in attribute_set_value()
568 bzero((char *)attr->attribute.pValue + new_attr->ulValueLen, in attribute_set_value()
569 attr->attribute.ulValueLen - new_attr->ulValueLen); in attribute_set_value()
571 } else if (new_attr->ulValueLen <= sizeof (attr->generic_data)) { in attribute_set_value()
574 bzero(attr->attribute.pValue, attr->attribute.ulValueLen); in attribute_set_value()
575 if (attr->isMalloced) { in attribute_set_value()
586 free(attr->attribute.pValue); in attribute_set_value()
587 attr->isMalloced = B_FALSE; in attribute_set_value()
590 attr->attribute.pValue = attr->generic_data; in attribute_set_value()
599 bzero(attr->attribute.pValue, attr->attribute.ulValueLen); in attribute_set_value()
600 attr->attribute.pValue = newStorage; in attribute_set_value()
601 attr->isMalloced = B_TRUE; in attribute_set_value()
604 (void) memcpy(attr->attribute.pValue, new_attr->pValue, in attribute_set_value()
606 attr->attribute.ulValueLen = new_attr->ulValueLen; in attribute_set_value()
607 attr->hasValueForClone = B_TRUE; in attribute_set_value()
622 generic_attr_t *attr; in find_attribute() local
627 for (i = 0, attr = attributes; i < num_attributes; i++, attr++) { in find_attribute()
628 if (attr->attribute.type == attrtype) { in find_attribute()
634 *found_attribute = found ? attr : NULL; in find_attribute()