tss: add support for getting the names of objects (including NV objects)

This is a precursor to supporting TPM2_PolicySecret.  The essential
component of this policy is the name of the object being used for
authorization.  The most common elements for names are persistent and
NV objects.  In each case the hash is that of the public area, but the
NV object also has to have a special call to retrieve the public area
(TPM2_NV_ReadPublic instead of TPM2_ReadPublic).  Add a name option to
tpm2_ReadPublic to allow it to retrieve the name and add
tpm2_NV_ReadPublic to retrieve the name of and NV index.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
5 files changed