mirror of
https://github.com/stefanberger/libtpms
synced 2026-01-21 20:52:54 +00:00
tpm2: rev155: Remove ObjectGetNameAlg()
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
parent
1207eec953
commit
c1b16825ee
@ -182,16 +182,6 @@ HandleToObject(
|
||||
pAssert(s_objects[index].attributes.occupied);
|
||||
return &s_objects[index];
|
||||
}
|
||||
/* 8.6.3.8 ObjectGetNameAlg() */
|
||||
/* This function is used to get the Name algorithm of a object. */
|
||||
/* This function requires that object references a loaded object. */
|
||||
TPMI_ALG_HASH
|
||||
ObjectGetNameAlg(
|
||||
OBJECT *object // IN: handle of the object
|
||||
)
|
||||
{
|
||||
return object->publicArea.nameAlg;
|
||||
}
|
||||
/* 8.6.3.9 GetQualifiedName() */
|
||||
/* This function returns the Qualified Name of the object. In this implementation, the Qualified
|
||||
Name is computed when the object is loaded and is saved in the internal representation of the
|
||||
|
||||
@ -95,10 +95,6 @@ GetName(
|
||||
TPMI_DH_OBJECT handle, // IN: handle of the object
|
||||
NAME *name // OUT: name of the object
|
||||
);
|
||||
TPMI_ALG_HASH
|
||||
ObjectGetNameAlg(
|
||||
OBJECT *object // IN: handle of the object
|
||||
);
|
||||
void
|
||||
GetQualifiedName(
|
||||
TPMI_DH_OBJECT handle, // IN: handle of the object
|
||||
|
||||
@ -926,7 +926,7 @@ SensitiveToPrivate(
|
||||
else
|
||||
{
|
||||
// Otherwise, using parent's name algorithm
|
||||
hashAlg = ObjectGetNameAlg(parent);
|
||||
hashAlg = parent->publicArea.nameAlg;
|
||||
}
|
||||
// Starting of sensitive data without wrappers
|
||||
sensitiveData = outPrivate->t.buffer;
|
||||
@ -993,7 +993,7 @@ PrivateToSensitive(
|
||||
else
|
||||
{
|
||||
// Otherwise, using parent's name algorithm
|
||||
hashAlg = ObjectGetNameAlg(parent);
|
||||
hashAlg = parent->publicArea.nameAlg;
|
||||
}
|
||||
// unwrap outer
|
||||
result = UnwrapOuter(parent, name, hashAlg, NULL, TRUE,
|
||||
@ -1083,7 +1083,7 @@ SensitiveToDuplicate(
|
||||
{
|
||||
doOuterWrap = TRUE;
|
||||
// Use parent nameAlg as outer hash algorithm
|
||||
outerHash = ObjectGetNameAlg(parent);
|
||||
outerHash = parent->publicArea.nameAlg;
|
||||
// Adjust sensitive data pointer
|
||||
sensitiveData += sizeof(UINT16) + CryptHashGetDigestSize(outerHash);
|
||||
}
|
||||
@ -1247,7 +1247,7 @@ SecretToCredential(
|
||||
UINT16 dataSize; // data blob size
|
||||
pAssert(secret != NULL && outIDObject != NULL);
|
||||
// use protector's name algorithm as outer hash
|
||||
outerHash = ObjectGetNameAlg(protector);
|
||||
outerHash = protector->publicArea.nameAlg;
|
||||
// Marshal secret area to credential buffer, leave space for integrity
|
||||
sensitiveData = outIDObject->t.credential
|
||||
+ sizeof(UINT16) + CryptHashGetDigestSize(outerHash);
|
||||
@ -1286,7 +1286,7 @@ CredentialToSecret(
|
||||
BYTE *sensitiveData; // pointer to the sensitive data
|
||||
UINT16 dataSize;
|
||||
// use protector's name algorithm as outer hash
|
||||
outerHash = ObjectGetNameAlg(protector);
|
||||
outerHash = protector->publicArea.nameAlg;
|
||||
// Unwrap outer, a TPM_RC_INTEGRITY error may be returned at this point
|
||||
result = UnwrapOuter(protector, name, outerHash, seed, FALSE,
|
||||
inIDObject->size, inIDObject->buffer);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user