This question pertains to the current (CVS) version of Trousers.
Suppose I have a key (say, a signing key) that was created bound to one or more
PCRs and then registered in the user persistent store. The key itself is fine
and can be loaded, used, etc. correctly.
However, subsequently, using Tspi_GetAttribData(hKey, TSS_TSPATTRIB_KEY_PCR,
xxx, ...) doesn't appear to "work" for any xxx, whether it be the pcr
selection, digest at release, or digest at creation.
To begin with, the call simply fails with an "object in inconsistent state"
error. I think it's because the pcrInfoType field of the tr_rsakey_obj
structure is not being populated. Therefore, the obj_rsakey_get_pcr_*()
functions all fail when they compare the requested pcrInfoType against what's
in the tr_rsakey_obj in question.
I experimented by setting the pcrInfoType field in obj_rsakey_add_by_key()
myself (based on whether TPM_TAG_KEY12 is there or not). Thereafter, the
Tspi_GetAttribData() call returns TSS_SUCCESS in every case, and even the
return blob length appears to be correct, but the blob contents are *always*
zero.
The returned blob lengths I'm seeing are 4, 20, and 20 for
TSS_TSPATTRIB_KEYPCR_SELECTION, TSS_TSPATTRIB_KEYPCR_DIGEST_ATRELEASE, and
TSS_TSPATTRIB_KEYPCR_DIGEST_ATCREATION, respectively. (For what it's worth, the
TPM in question is an Infineon SLB9635TT.)
It's late at night and I'm likely missing something, but is it possible that
the retrieval of these specific attributes in the case of keys is not wired up
properly in Trousers? In particular, just as pcrInfoType wasn't being
populated, I can't see how/where the pcrInfo union (that is, either the info11
or infolong fields) is being populated.
After UnloadBlob_TSS_KEY() returns in obj_rsa_add_by_key(),
rsakey->key.PCRInfoSize is 44 bytes and rsakey->key.PCRInfo is non-NULL (which,
again, sounds right). I dumped the selection value here, which too looked good:
2 bytes size and 2 bytes bitmap with the right bits being set after taking
endianness into account.
Any insights?
Thx
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
TrouSerS-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/trousers-users