Lines Matching defs:object
74 * will try to create the object in the next available slot.
117 meta_object_t *object = NULL;
130 rv = meta_object_alloc(session, &object);
135 * Create a clone of the object
142 * Set to true (token object) if template has CKA_TOKEN=true;
143 * otherwise, it is false (session object).
146 &(object->isToken));
149 if ((IS_READ_ONLY_SESSION(session->session_flags)) && object->isToken) {
155 * Set to true (private object) if template has CKA_PRIVATE=true;
156 * otherwise, it is false (public object).
159 &(object->isPrivate));
161 /* Assume object is extractable unless template has otherwise */
162 object->isExtractable = B_TRUE;
164 &(object->isExtractable));
167 * Set to true (sensitive object) if template has CKA_SENSITIVE=true;
171 &(object->isSensitive));
181 if (meta_freeobject_check(session, object, NULL, pTemplate, ulCount,
185 * private freetoken object.
187 if (object->isPrivate && !metaslot_logged_in()) {
192 if (!meta_freeobject_set(object, pTemplate, ulCount, B_TRUE)) {
201 if (object->isToken || object->isFreeToken == FREE_ENABLED) {
204 * If this is a token object or a FreeToken then create it
214 object->tried_create_clone[slot_num] = B_TRUE;
224 * Create a clone of the object in the first available slot.
245 object->tried_create_clone[slot_num] = B_TRUE;
267 object->clones[slot_num] = slot_object;
268 object->master_clone_slotnum = slot_num;
271 if (object->isFreeToken == FREE_ENABLED)
272 object->isToken = B_TRUE;
275 object->isToken);
303 * is set for the object. The supplied template is
306 * the object in a slot that's not capable of performing
310 &object->attributes, &object->num_attributes);
315 object->attributes, object->num_attributes);
319 meta_object_activate(object);
320 *phObject = (CK_OBJECT_HANDLE) object;
331 if (object)
332 (void) meta_object_dealloc(session, object, B_TRUE);
398 * if the dst object is a token object, and the source
399 * object is not, the source object needs to be extractable.
400 * Otherwise, the source object needs to reside in the
401 * token object slot
410 /* determine if dst is going to be private object or not */
414 /* will be the same as the source object */
455 /* source object isn't clonable in another slot */
470 /* Try operation on other slots if the object is clonable */
604 * This function destroys an object by first removing it from the
605 * list of valid objects for a given session (if session object) or
606 * the global token object list. And then, calling C_DestroyObject
607 * on all the slots on which we have created a clone of this object.
614 meta_object_t *object;
620 rv = meta_handle2object(hObject, &object);
628 (object->isToken || object->isFreeToken == FREE_ENABLED)) {
629 OBJRELEASE(object);
634 /* Remove object from list of valid meta_objects */
635 rv = meta_object_deactivate(object, B_FALSE, B_TRUE);
639 * created a clone of this object.
642 rv = meta_object_dealloc(session, object, B_TRUE);
678 meta_object_t *object;
689 rv = meta_handle2object(hObject, &object);
695 slotnum = object->master_clone_slotnum;
701 slot_session->hSession, object->clones[slotnum]->hObject,
707 OBJRELEASE(object);
734 meta_object_t *object;
750 rv = meta_handle2object(hObject, &object);
757 (object->isToken || object->isFreeToken == FREE_ENABLED)) {
762 if ((!object->isExtractable) && (object->attributes == NULL)) {
764 * object has no clone, just need to do the operation
768 slotnum = object->master_clone_slotnum;
775 object->clones[slotnum]->hObject, pTemplate,
787 * object might have clones, need to do operation in all clones
797 * object, none of the clones should be deleted.
809 if (object->clones[slotnum] != NULL) {
819 object->clones[slotnum]->hObject, pTemplate,
848 slot_object_t *clone = object->clones[slotnum];
865 object->clones[slotnum] = NULL;
867 if (slotnum == object->master_clone_slotnum) {
876 if (object->clones[slotnum]) {
877 object->master_clone_slotnum = slotnum;
896 * Update the attribute information we keep in our metaslot object
898 slot_object = object->clones[object->master_clone_slotnum];
899 rv = meta_get_slot_session(object->master_clone_slotnum,
903 slot_object->hObject, object);
908 if (object->attributes != NULL) {
913 (void) pthread_rwlock_wrlock(&object->attribute_lock);
917 object->attributes, object->num_attributes);
920 (void) pthread_rwlock_unlock(&object->attribute_lock);
927 OBJRELEASE(object);
947 add_to_search_result(meta_object_t *object, find_objs_info_t *info,
962 (info->matched_objs)[(info->num_matched_objs)++] = object;
973 meta_object_t *object;
978 object = meta_object_find_by_handle(results[i], slotnum,
982 * a token object is found from the keystore,
983 * need to create a meta object for it
985 if (object == NULL) {
988 rv = meta_object_alloc(session, &object);
995 (void) meta_object_dealloc(session, object,
1001 object->master_clone_slotnum = slotnum;
1002 object->clones[slotnum] = slot_object;
1007 slot_object->hObject, object);
1009 (void) meta_object_dealloc(session, object,
1016 meta_object_activate(object);
1020 if (!meta_object_in_list(object, info->matched_objs,
1022 rv = add_to_search_result(object, info,
1122 /* see if the template indicates token object only or not */
1133 * token object slot
1156 * if the slot is NOT the token object slot, and
1223 * matching object. All the work is done in FindObjectsInit(). This
1256 /* sanity check to see if object is still valid */