mirror of
https://github.com/stefanberger/libtpms
synced 2026-01-20 19:56:35 +00:00
rev148: Fix return code in TPM2_PolicyTemplate
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
This commit is contained in:
parent
16ec2970d7
commit
013059004d
@ -1095,7 +1095,7 @@ TPM2_PolicyTemplate(
|
||||
}
|
||||
// error if cpHash contains something that is not a template
|
||||
else if(session->u1.templateHash.t.size != 0)
|
||||
return TPM_RCS_VALUE + RC_PolicyTemplate_templateHash;
|
||||
return TPM_RC_CPHASH;
|
||||
// A valid templateHash must have the same size as session hash digest
|
||||
if(in->templateHash.t.size != CryptHashGetDigestSize(session->authHashAlg))
|
||||
return TPM_RCS_SIZE + RC_PolicyTemplate_templateHash;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user