• Home
  • Raw
  • Download

Lines Matching full:object

17 //       This function is called at TPM2_Startup() to initialize the object subsystem.
25 // object slots initialization in ObjectStartup()
37 // In this implementation, a persistent object is moved from NV into an object slot for proce…
51 // If an object is a temporary evict object, flush it from slot in ObjectCleanupEvict()
52 if(s_objects[i].object.entity.attributes.evict == SET) in ObjectCleanupEvict()
61 // This function checks to see if a transient handle references a loaded object. This routine s…
67 // TRUE if the handle references a loaded object
68 // FALSE if the handle is not an object handle, or it does not refe…
69 // loaded object
76 UINT32 slotIndex; // index of object slot in ObjectIsPresent()
78 // The index in the loaded object array is found by subtracting the first in ObjectIsPresent()
79 // object handle number from the input handle number. If the indicated in ObjectIsPresent()
81 // object associated with the handle. in ObjectIsPresent()
91 // This function is used to check if the object is a sequence object. This function should not …
92 // handle does not reference a loaded object.
96 // TRUE object is an HMAC, hash, or event sequence object
97 // FALSE object is not an HMAC, hash, or event sequence object
101 OBJECT *object // IN: handle to be checked in ObjectIsSequence() argument
104 pAssert (object != NULL); in ObjectIsSequence()
105 if( object->attributes.hmacSeq == SET in ObjectIsSequence()
106 || object->attributes.hashSeq == SET in ObjectIsSequence()
107 || object->attributes.eventSeq == SET) in ObjectIsSequence()
116 // This function is used to find the object structure associated with a handle.
117 // This function requires that handle references a loaded object.
119 OBJECT*
121 TPMI_DH_OBJECT handle // IN: handle of the object in ObjectGet()
128 // object. in ObjectGet()
129 return &s_objects[handle - TRANSIENT_FIRST].object.entity; in ObjectGet()
135 // This function is used to access the Name of the object. In this implementation, the Name is…
136 // when the object is loaded and is saved in the internal representation of the object. This f…
137 // the Name data from the object into the buffer at name and returns the number of octets copi…
138 // This function requires that handle references a loaded object.
142 TPMI_DH_OBJECT handle, // IN: handle of the object in ObjectGetName()
143 NAME *name // OUT: name of the object in ObjectGetName()
146 OBJECT *object = ObjectGet(handle); in ObjectGetName() local
147 if(object->publicArea.nameAlg == TPM_ALG_NULL) in ObjectGetName()
150 MemoryCopy(name, object->name.t.name, object->name.t.size, sizeof(NAME)); in ObjectGetName()
151 return object->name.t.size; in ObjectGetName()
157 // This function is used to get the Name algorithm of a object.
158 // This function requires that handle references a loaded object.
162 TPMI_DH_OBJECT handle // IN: handle of the object in ObjectGetNameAlg()
165 OBJECT *object = ObjectGet(handle); in ObjectGetNameAlg() local
166 return object->publicArea.nameAlg; in ObjectGetNameAlg()
173 // This function returns the Qualified Name of the object. In this implementation, the Qualifi…
174 // computed when the object is loaded and is saved in the internal representation of the objec…
177 // This function requires that handle references a loaded object.
181 TPMI_DH_OBJECT handle, // IN: handle of the object in ObjectGetQualifiedName()
182 TPM2B_NAME *qualifiedName // OUT: qualified name of the object in ObjectGetQualifiedName()
185 OBJECT *object = ObjectGet(handle); in ObjectGetQualifiedName() local
186 if(object->publicArea.nameAlg == TPM_ALG_NULL) in ObjectGetQualifiedName()
190 *qualifiedName = object->qualifiedName; in ObjectGetQualifiedName()
197 // This function returns the handle for the hierarchy of an object.
201 OBJECT *object // IN :object in ObjectDataGetHierarchy() argument
204 if(object->attributes.spsHierarchy) in ObjectDataGetHierarchy()
208 else if(object->attributes.epsHierarchy) in ObjectDataGetHierarchy()
212 else if(object->attributes.ppsHierarchy) in ObjectDataGetHierarchy()
227 // to an object.
228 // This function requires that handle references a loaded object.
232 TPMI_DH_OBJECT handle // IN :object handle in ObjectGetHierarchy()
235 OBJECT *object = ObjectGet(handle); in ObjectGetHierarchy() local
236 return ObjectDataGetHierarchy(object); in ObjectGetHierarchy()
242 // This function is used to allocate a slot in internal object array.
251 TPMI_DH_OBJECT *handle, // OUT: handle of allocated object in ObjectAllocateSlot()
252 OBJECT **object // OUT: points to the allocated object in ObjectAllocateSlot() argument
266 // If we reach the end of object slot without finding a free one, return in ObjectAllocateSlot()
270 *object = &s_objects[i].object.entity; in ObjectAllocateSlot()
272 MemorySet(*object, 0, sizeof(**object)); in ObjectAllocateSlot()
279 // This function loads an object into an internal object structure. If an error is returned, t…
287 // TPM_RC_BINDING if the public and sensitive parts of the object are not m…
288 // TPM_RC_KEY if the parameters in the public area of the object are no…
289 // TPM_RC_OBJECT_MEMORY if there is no free slot for an object
294 TPMI_RH_HIERARCHY hierarchy, // IN: hierarchy to which the object belongs in ObjectLoad()
297 TPM2B_NAME *name, // IN: object's name (may be null) in ObjectLoad()
301 TPMI_DH_OBJECT *handle // OUT: object handle in ObjectLoad()
304 OBJECT *object = NULL; in ObjectLoad() local
305 OBJECT *parent = NULL; in ObjectLoad()
308 // Try to allocate a slot for new object in ObjectLoad()
309 if(!ObjectAllocateSlot(handle, &object)) in ObjectLoad()
312 object->publicArea = *publicArea; in ObjectLoad()
314 object->sensitive = *sensitive; in ObjectLoad()
319 if(!CryptObjectIsPublicConsistent(&object->publicArea)) in ObjectLoad()
327 result = CryptObjectPublicPrivateMatch(object); in ObjectLoad()
332 object->attributes.publicOnly = (sensitive == NULL); in ObjectLoad()
334 // object as it has no qualified name and it is not a member of any in ObjectLoad()
338 object->qualifiedName.t.size = 0; in ObjectLoad()
339 object->name.t.size = 0; in ObjectLoad()
340 object->attributes.temporary = SET; in ObjectLoad()
344 // object in ObjectLoad()
356 // Check for stClear object in ObjectLoad()
360 object->attributes.stClear = SET; in ObjectLoad()
362 object->name = *name; in ObjectLoad()
363 // Compute object qualified name in ObjectLoad()
365 name, &object->qualifiedName); in ObjectLoad()
366 // Any object in TPM_RH_NULL hierarchy is temporary in ObjectLoad()
369 object->attributes.temporary = SET; in ObjectLoad()
374 // handle, this object is a primary object in ObjectLoad()
375 object->attributes.primary = SET; in ObjectLoad()
380 object->attributes.ppsHierarchy = SET; in ObjectLoad()
383 object->attributes.spsHierarchy = SET; in ObjectLoad()
386 object->attributes.epsHierarchy = SET; in ObjectLoad()
405 // that a sequence object is not inadvertently used for an operation that is not appropriate f…
410 HASH_OBJECT **object, // OUT: receives pointer to allocated object in AllocateSequenceSlot() argument
414 OBJECT *objectHash; // the hash as an object in AllocateSequenceSlot()
417 *object = (HASH_OBJECT *)objectHash; in AllocateSequenceSlot()
419 // object state data. in AllocateSequenceSlot()
420 pAssert(&((*object)->auth) == &objectHash->publicArea.authPolicy); in AllocateSequenceSlot()
421 // Set the common values that a sequence object shares with an ordinary object in AllocateSequenceSlot()
423 (*object)->type = TPM_ALG_NULL; in AllocateSequenceSlot()
425 (*object)->nameAlg = TPM_ALG_NULL; in AllocateSequenceSlot()
427 MemorySet(&((*object)->objectAttributes), 0, sizeof(TPMA_OBJECT)); in AllocateSequenceSlot()
428 // A sequence object is considered to be in the NULL hierarchy so it should in AllocateSequenceSlot()
430 (*object)->attributes.temporary = SET; in AllocateSequenceSlot()
431 // A sequence object is DA exempt. in AllocateSequenceSlot()
432 (*object)->objectAttributes.noDA = SET; in AllocateSequenceSlot()
436 (*object)->auth = *auth; in AllocateSequenceSlot()
439 (*object)->auth.t.size = 0; in AllocateSequenceSlot()
446 // This function creates an internal HMAC sequence object.
450 // TPM_RC_OBJECT_MEMORY if there is no free slot for an object
456 // object in ObjectCreateHMACSequence()
458 TPMI_DH_OBJECT *newHandle // OUT: HMAC sequence object handle in ObjectCreateHMACSequence()
462 OBJECT *keyObject; in ObjectCreateHMACSequence()
463 // Try to allocate a slot for new object in ObjectCreateHMACSequence()
468 // Get pointer to the HMAC key object in ObjectCreateHMACSequence()
478 // This function creates a hash sequence object.
482 // TPM_RC_OBJECT_MEMORY if there is no free slot for an object
488 TPMI_DH_OBJECT *newHandle // OUT: sequence object handle in ObjectCreateHashSequence()
492 // Try to allocate a slot for new object in ObjectCreateHashSequence()
505 // This function creates an event sequence object.
509 // TPM_RC_OBJECT_MEMORY if there is no free slot for an object
514 TPMI_DH_OBJECT *newHandle // OUT: sequence object handle in ObjectCreateEventSequence()
520 // Try to allocate a slot for new object in ObjectCreateEventSequence()
528 // If this is a _TPM_Init or _TPM_HashStart, the sequence object will in ObjectCreateEventSequence()
552 // Don't assume that this is a proper sequence object in ObjectTerminateEvent()
563 // Flush sequence object in ObjectTerminateEvent()
573 // This function loads an object from a saved object context.
577 // TPM_RC_OBJECT_MEMORY if there is no free slot for an object
581 OBJECT *object, // IN: object structure from saved context in ObjectContextLoad() argument
582 TPMI_DH_OBJECT *handle // OUT: object handle in ObjectContextLoad()
585 OBJECT *newObject; in ObjectContextLoad()
586 // Try to allocate a slot for new object in ObjectContextLoad()
589 // Copy input object data to internal structure in ObjectContextLoad()
590 *newObject = *object; in ObjectContextLoad()
597 // This function frees an object slot.
598 // This function requires that the object is loaded.
610 MemorySet((BYTE*)&(s_objects[index].object.entity.attributes), in ObjectFlush()
627 // iterate object slots in ObjectFlushHierarchy()
635 if(s_objects[i].object.entity.attributes.ppsHierarchy == SET) in ObjectFlushHierarchy()
639 if(s_objects[i].object.entity.attributes.spsHierarchy == SET) in ObjectFlushHierarchy()
643 if(s_objects[i].object.entity.attributes.epsHierarchy == SET) in ObjectFlushHierarchy()
658 // This function loads a persistent object into a transient object slot.
659 // This function requires that handle is associated with a persistent object.
663 // TPM_RC_HANDLE the persistent object does not exist or the associated hi…
665 // TPM_RC_OBJECT_MEMORY no object slot
669 TPM_HANDLE *handle, // IN:OUT: evict object handle. If success, it in ObjectLoadEvict()
670 // will be replace by the loaded object handle in ObjectLoadEvict()
676 OBJECT *object; in ObjectLoadEvict() local
677 // If this is an index that references a persistent object created by in ObjectLoadEvict()
688 // Try to allocate a slot for an object in ObjectLoadEvict()
689 if(!ObjectAllocateSlot(handle, &object)) in ObjectLoadEvict()
691 // Copy persistent object to transient object slot. A TPM_RC_HANDLE in ObjectLoadEvict()
693 // a transient object so that it will be flushed at the end of the in ObjectLoadEvict()
695 result = NvGetEvictObject(evictHandle, object); in ObjectLoadEvict()
699 // check the object to see if it is in the endorsement hierarchy in ObjectLoadEvict()
704 if( ObjectDataGetHierarchy(object) == TPM_RH_ENDORSEMENT in ObjectLoadEvict()
715 // This function computes the Name of an object from its public area.
719 TPMT_PUBLIC *publicArea, // IN: public area of an object in ObjectComputeName()
720 TPM2B_NAME *name // OUT: name of the object in ObjectComputeName()
753 // This function computes the qualified name of an object.
759 TPM2B_NAME *name, // IN: name of the object in ObjectComputeQualifiedName()
760 TPM2B_NAME *qualifiedName // OUT: qualified name of the object in ObjectComputeQualifiedName()
783 // an asymmetric object that has its restricted and decrypt attributes SET, and sign CLEAR.
787 // TRUE if the object is a storage key
788 // FALSE if the object is not a storage key
792 TPMT_PUBLIC *publicArea // IN: public area of the object in ObjectDataIsStorage()
807 // This function determines if an object has the attributes associated with a storage key. A s…
808 // asymmetric object that has its restricted and decrypt attributes SET, and sign CLEAR.
812 // TRUE if the object is a storage key
813 // FALSE if the object is not a storage key
817 TPMI_DH_OBJECT handle // IN: object handle in ObjectIsStorage()
820 OBJECT *object = ObjectGet(handle); in ObjectIsStorage() local
821 return ObjectDataIsStorage(&object->publicArea); in ObjectIsStorage()
827 // This function returns a a list of handles of loaded object, starting from handle. Handle mu…
828 // range of valid transient object handles, but does not have to be the handle of a loaded tra…
849 // Iterate object slots to get loaded object handles in ObjectCapGetLoaded()
854 // A valid transient object can not be the copy of a persistent object in ObjectCapGetLoaded()
855 pAssert(s_objects[i].object.entity.attributes.evict == CLEAR); in ObjectCapGetLoaded()
858 // If we have not filled up the return list, add this object in ObjectCapGetLoaded()
866 // If the return list is full but we still have loaded object in ObjectCapGetLoaded()
889 // Iterate object slot to get the number of unoccupied slots in ObjectCapGetTransientAvail()