Lines Matching +full:case +full:- +full:sensitive
55 object->attributes.occupied = CLEAR; in ObjectFlush()
65 object->attributes.occupied = SET; in ObjectSetInUse()
105 if(object->attributes.evict == SET) in ObjectCleanupEvict()
115 // implementation-dependent allowed in range for loaded transient objects.
125 UINT32 slotIndex = handle - TRANSIENT_FIRST; in IsObjectPresent()
128 // TRANSIENT_FIRST -- (TRANSIENT_FIRST + MAX_LOADED_OBJECT - 1) in IsObjectPresent()
148 return (object->attributes.hmacSeq == SET in ObjectIsSequence()
149 || object->attributes.hashSeq == SET in ObjectIsSequence()
150 || object->attributes.eventSeq == SET); in ObjectIsSequence()
171 index = handle - TRANSIENT_FIRST; in HandleToObject()
196 case TPM_HT_PERMANENT: in GetQualifiedName()
197 qualifiedName->t.size = sizeof(TPM_HANDLE); in GetQualifiedName()
198 UINT32_TO_BYTE_ARRAY(handle, qualifiedName->t.name); in GetQualifiedName()
200 case TPM_HT_TRANSIENT: in GetQualifiedName()
202 if(object == NULL || object->publicArea.nameAlg == TPM_ALG_NULL) in GetQualifiedName()
203 qualifiedName->t.size = 0; in GetQualifiedName()
206 *qualifiedName = object->qualifiedName; in GetQualifiedName()
221 if(object->attributes.spsHierarchy) in ObjectGetHierarchy()
225 else if(object->attributes.epsHierarchy) in ObjectGetHierarchy()
229 else if(object->attributes.ppsHierarchy) in ObjectGetHierarchy()
273 if(object->attributes.occupied == CLEAR) in FindEmptyObjectSlot()
278 MemorySet(&object->attributes, 0, sizeof(OBJECT_ATTRIBUTES)); in FindEmptyObjectSlot()
313 TPMA_OBJECT objectAttributes = object->publicArea.objectAttributes; in ObjectSetLoadedAttributes()
317 object->attributes.stClear = in ObjectSetLoadedAttributes()
322 object->attributes.primary = SET; in ObjectSetLoadedAttributes()
325 case TPM_RH_ENDORSEMENT: in ObjectSetLoadedAttributes()
326 object->attributes.epsHierarchy = SET; in ObjectSetLoadedAttributes()
328 case TPM_RH_OWNER: in ObjectSetLoadedAttributes()
329 object->attributes.spsHierarchy = SET; in ObjectSetLoadedAttributes()
331 case TPM_RH_PLATFORM: in ObjectSetLoadedAttributes()
332 object->attributes.ppsHierarchy = SET; in ObjectSetLoadedAttributes()
336 object->attributes.temporary = SET; in ObjectSetLoadedAttributes()
337 object->attributes.primary = CLEAR; in ObjectSetLoadedAttributes()
344 object->attributes.stClear = in ObjectSetLoadedAttributes()
346 || (parent->attributes.stClear == SET)); in ObjectSetLoadedAttributes()
347 object->attributes.epsHierarchy = parent->attributes.epsHierarchy; in ObjectSetLoadedAttributes()
348 object->attributes.spsHierarchy = parent->attributes.spsHierarchy; in ObjectSetLoadedAttributes()
349 object->attributes.ppsHierarchy = parent->attributes.ppsHierarchy; in ObjectSetLoadedAttributes()
352 object->attributes.temporary = parent->attributes.temporary in ObjectSetLoadedAttributes()
353 || object->attributes.external; in ObjectSetLoadedAttributes()
357 if(object->attributes.external) in ObjectSetLoadedAttributes()
358 object->qualifiedName = object->name; in ObjectSetLoadedAttributes()
363 && !object->attributes.publicOnly in ObjectSetLoadedAttributes()
365 && object->publicArea.nameAlg != TPM_ALG_NULL) in ObjectSetLoadedAttributes()
369 if(object->publicArea.type == TPM_ALG_KEYEDHASH) in ObjectSetLoadedAttributes()
370 object->attributes.derivation = SET; in ObjectSetLoadedAttributes()
372 object->attributes.isParent = SET; in ObjectSetLoadedAttributes()
374 ComputeQualifiedName(parentHandle, object->publicArea.nameAlg, in ObjectSetLoadedAttributes()
375 &object->name, &object->qualifiedName); in ObjectSetLoadedAttributes()
384 // (unless its 'nameAlg' is TPM_ALG_NULL). If a sensitive part is loaded, it is
385 // verified to be correct and if both public and sensitive parts are loaded, then
394 TPMT_SENSITIVE *sensitive, // IN: (optional) sensitive area to be in ObjectLoad() argument
399 // sensitive area errors in ObjectLoad()
408 // Is this public only or a no-name object? in ObjectLoad()
409 if(sensitive == NULL || publicArea->nameAlg == TPM_ALG_NULL) in ObjectLoad()
417 // For any sensitive area, make sure that the seedSize is no larger than the in ObjectLoad()
419 if(sensitive->seedValue.t.size > CryptHashGetDigestSize(publicArea->nameAlg)) in ObjectLoad()
427 // Sensitive area and binding checks in ObjectLoad()
432 || ((parent != NULL) && !IS_ATTRIBUTE(parent->publicArea.objectAttributes, in ObjectLoad()
436 result = CryptValidateKeys(publicArea, sensitive, blamePublic, in ObjectLoad()
446 if((publicArea->type == TPM_ALG_RSA) && (sensitive != NULL)) in ObjectLoad()
448 result = CryptRsaLoadPrivateExponent(publicArea, sensitive); in ObjectLoad()
457 object->publicArea = *publicArea; in ObjectLoad()
458 // Copy sensitive if there is one in ObjectLoad()
459 if(sensitive == NULL) in ObjectLoad()
460 object->attributes.publicOnly = SET; in ObjectLoad()
462 object->sensitive = *sensitive; in ObjectLoad()
465 object->name = *name; in ObjectLoad()
467 object->name.t.size = 0; in ObjectLoad()
495 MemorySet(&object->objectAttributes, 0, sizeof(TPMA_OBJECT)); in AllocateSequenceSlot()
498 object->type = TPM_ALG_NULL; in AllocateSequenceSlot()
501 object->nameAlg = TPM_ALG_NULL; in AllocateSequenceSlot()
505 object->attributes.temporary = SET; in AllocateSequenceSlot()
508 SET_ATTRIBUTE(object->objectAttributes, TPMA_OBJECT, noDA); in AllocateSequenceSlot()
512 object->auth = *auth; in AllocateSequenceSlot()
514 object->auth.t.size = 0; in AllocateSequenceSlot()
541 hmacObject->attributes.hmacSeq = SET; in ObjectCreateHMACSequence()
544 if(CryptHmacStart(&hmacObject->state.hmacState, hashAlg, in ObjectCreateHMACSequence()
545 keyObject->sensitive.sensitive.bits.b.size, in ObjectCreateHMACSequence()
546 keyObject->sensitive.sensitive.bits.b.buffer) == 0) in ObjectCreateHMACSequence()
548 if(CryptMacStart(&hmacObject->state.hmacState, in ObjectCreateHMACSequence()
549 &keyObject->publicArea.parameters, in ObjectCreateHMACSequence()
550 hashAlg, &keyObject->sensitive.sensitive.any.b) == 0) in ObjectCreateHMACSequence()
574 hashObject->attributes.hashSeq = SET; in ObjectCreateHashSequence()
577 CryptHashStart(&hashObject->state.hashState[0], hashAlg); in ObjectCreateHashSequence()
600 hashObject->attributes.eventSeq = SET; in ObjectCreateEventSequence()
604 CryptHashStart(&hashObject->state.hashState[count], hash); in ObjectCreateEventSequence()
623 if(hashObject->attributes.eventSeq) in ObjectTerminateEvent()
625 // If it is, close any open hash contexts. This is done in case in ObjectTerminateEvent()
631 CryptHashEnd(&hashObject->state.hashState[count], 0, buffer); in ObjectTerminateEvent()
683 UINT32 index = handle - TRANSIENT_FIRST; in FlushObject()
709 case TPM_RH_PLATFORM: in ObjectFlushHierarchy()
713 case TPM_RH_OWNER: in ObjectFlushHierarchy()
717 case TPM_RH_ENDORSEMENT: in ObjectFlushHierarchy()
798 name->t.size = CryptHashBlock(nameAlg, size, publicArea, in ObjectComputeName()
799 sizeof(name->t.name) - 2, in ObjectComputeName()
800 &name->t.name[2]); in ObjectComputeName()
802 UINT16_TO_BYTE_ARRAY(nameAlg, name->t.name); in ObjectComputeName()
803 name->t.size += 2; in ObjectComputeName()
822 if(publicArea->nameAlg == TPM_ALG_NULL) in PublicMarshalAndComputeName()
823 name->t.size = 0; in PublicMarshalAndComputeName()
830 publicArea->nameAlg, name); in PublicMarshalAndComputeName()
850 MemoryCopy2B(&qualifiedName->b, &name->b, sizeof(qualifiedName->t.name)); in ComputeQualifiedName()
860 qualifiedName->t.size = CryptHashStart(&hashState, nameAlg); in ComputeQualifiedName()
866 CryptDigestUpdate2B(&hashState, &name->b); in ComputeQualifiedName()
869 CryptHashEnd(&hashState, qualifiedName->t.size, in ComputeQualifiedName()
870 &qualifiedName->t.name[2]); in ComputeQualifiedName()
871 UINT16_TO_BYTE_ARRAY(nameAlg, qualifiedName->t.name); in ComputeQualifiedName()
872 qualifiedName->t.size += 2; in ComputeQualifiedName()
890 TPMT_PUBLIC *publicArea = ((object != NULL) ? &object->publicArea : NULL); in ObjectIsStorage()
893 && IS_ATTRIBUTE(publicArea->objectAttributes, TPMA_OBJECT, restricted) in ObjectIsStorage()
894 && IS_ATTRIBUTE(publicArea->objectAttributes, TPMA_OBJECT, decrypt) in ObjectIsStorage()
895 && !IS_ATTRIBUTE(publicArea->objectAttributes, TPMA_OBJECT, sign) in ObjectIsStorage()
896 && (object->publicArea.type == TPM_ALG_RSA in ObjectIsStorage()
897 || object->publicArea.type == TPM_ALG_ECC)); in ObjectIsStorage()
920 handleList->count = 0; in ObjectCapGetLoaded()
926 for(i = handle - TRANSIENT_FIRST; i < MAX_LOADED_OBJECTS; i++) in ObjectCapGetLoaded()
933 if(handleList->count < count) in ObjectCapGetLoaded()
937 handleList->handle[handleList->count] = i + TRANSIENT_FIRST; in ObjectCapGetLoaded()
938 handleList->count++; in ObjectCapGetLoaded()
980 return HandleToObject(handle)->publicArea.objectAttributes; in ObjectGetPublicAttributes()
988 return HandleToObject(handle)->attributes; in ObjectGetProperties()