Lines Matching refs:object

75  * will try to create the object in the next available slot.
118 meta_object_t *object = NULL;
131 rv = meta_object_alloc(session, &object);
136 * Create a clone of the object
143 * Set to true (token object) if template has CKA_TOKEN=true;
144 * otherwise, it is false (session object).
147 &(object->isToken));
150 if ((IS_READ_ONLY_SESSION(session->session_flags)) && object->isToken) {
156 * Set to true (private object) if template has CKA_PRIVATE=true;
157 * otherwise, it is false (public object).
160 &(object->isPrivate));
162 /* Assume object is extractable unless template has otherwise */
163 object->isExtractable = B_TRUE;
165 &(object->isExtractable));
168 * Set to true (sensitive object) if template has CKA_SENSITIVE=true;
172 &(object->isSensitive));
182 if (meta_freeobject_check(session, object, NULL, pTemplate, ulCount,
186 * private freetoken object.
188 if (object->isPrivate && !metaslot_logged_in())
191 if (!meta_freeobject_set(object, pTemplate, ulCount, B_TRUE))
198 if (object->isToken || object->isFreeToken == FREE_ENABLED) {
201 * If this is a token object or a FreeToken then create it
211 object->tried_create_clone[slot_num] = B_TRUE;
221 * Create a clone of the object in the first available slot.
242 object->tried_create_clone[slot_num] = B_TRUE;
264 object->clones[slot_num] = slot_object;
265 object->master_clone_slotnum = slot_num;
268 if (object->isFreeToken == FREE_ENABLED)
269 object->isToken = B_TRUE;
272 object->isToken);
300 * is set for the object. The supplied template is
303 * the object in a slot that's not capable of performing
307 &object->attributes, &object->num_attributes);
312 object->attributes, object->num_attributes);
316 meta_object_activate(object);
317 *phObject = (CK_OBJECT_HANDLE) object;
328 if (object)
329 (void) meta_object_dealloc(session, object, B_TRUE);
395 * if the dst object is a token object, and the source
396 * object is not, the source object needs to be extractable.
397 * Otherwise, the source object needs to reside in the
398 * token object slot
407 /* determine if dst is going to be private object or not */
411 /* will be the same as the source object */
452 /* source object isn't clonable in another slot */
467 /* Try operation on other slots if the object is clonable */
601 * This function destroys an object by first removing it from the
602 * list of valid objects for a given session (if session object) or
603 * the global token object list. And then, calling C_DestroyObject
604 * on all the slots on which we have created a clone of this object.
611 meta_object_t *object;
617 rv = meta_handle2object(hObject, &object);
625 (object->isToken || object->isFreeToken == FREE_ENABLED)) {
626 OBJRELEASE(object);
631 /* Remove object from list of valid meta_objects */
632 rv = meta_object_deactivate(object, B_FALSE, B_TRUE);
636 * created a clone of this object.
639 rv = meta_object_dealloc(session, object, B_TRUE);
675 meta_object_t *object;
686 rv = meta_handle2object(hObject, &object);
692 slotnum = object->master_clone_slotnum;
698 slot_session->hSession, object->clones[slotnum]->hObject,
704 OBJRELEASE(object);
731 meta_object_t *object;
747 rv = meta_handle2object(hObject, &object);
754 (object->isToken || object->isFreeToken == FREE_ENABLED)) {
759 if ((!object->isExtractable) && (object->attributes == NULL)) {
761 * object has no clone, just need to do the operation
765 slotnum = object->master_clone_slotnum;
772 object->clones[slotnum]->hObject, pTemplate,
784 * object might have clones, need to do operation in all clones
794 * object, none of the clones should be deleted.
806 if (object->clones[slotnum] != NULL) {
816 object->clones[slotnum]->hObject, pTemplate,
845 slot_object_t *clone = object->clones[slotnum];
862 object->clones[slotnum] = NULL;
864 if (slotnum == object->master_clone_slotnum) {
873 if (object->clones[slotnum]) {
874 object->master_clone_slotnum = slotnum;
893 * Update the attribute information we keep in our metaslot object
895 slot_object = object->clones[object->master_clone_slotnum];
896 rv = meta_get_slot_session(object->master_clone_slotnum,
900 slot_object->hObject, object);
905 if (object->attributes != NULL) {
910 (void) pthread_rwlock_wrlock(&object->attribute_lock);
914 object->attributes, object->num_attributes);
917 (void) pthread_rwlock_unlock(&object->attribute_lock);
924 OBJRELEASE(object);
944 add_to_search_result(meta_object_t *object, find_objs_info_t *info,
959 (info->matched_objs)[(info->num_matched_objs)++] = object;
970 meta_object_t *object;
975 object = meta_object_find_by_handle(results[i], slotnum,
979 * a token object is found from the keystore,
980 * need to create a meta object for it
982 if (object == NULL) {
985 rv = meta_object_alloc(session, &object);
992 (void) meta_object_dealloc(session, object,
998 object->master_clone_slotnum = slotnum;
999 object->clones[slotnum] = slot_object;
1004 slot_object->hObject, object);
1006 (void) meta_object_dealloc(session, object,
1013 meta_object_activate(object);
1017 if (!meta_object_in_list(object, info->matched_objs,
1019 rv = add_to_search_result(object, info,
1119 /* see if the template indicates token object only or not */
1130 * token object slot
1153 * if the slot is NOT the token object slot, and
1220 * matching object. All the work is done in FindObjectsInit(). This
1253 /* sanity check to see if object is still valid */