#115 LoadKeyByUUID fails with TCPA_E_BADTAG

Bug
open
Kent Yoder
5
2009-07-27
2009-02-10
Bryan
No

When I invoke Tspi_Context_LoadKeyByUUID with an AIK (rather than the SRK), the command fails with a TCPA_E_BADTAG error.

The problem appears to be due to the fact that TQD eventually prompts the TCSD to send a LoadKey command (which is actually deprecated in favor of LoadKey2) with a tag set for no authentication. However, the LoadKey command requires an Auth1 tag (and presumably the accompanying auth info too).

A work around is to replace:

result = Tspi_Context_LoadKeyByUUID(hContext,
TSS_PS_TYPE_SYSTEM,
uuid,
&hIdentKey);

with:

result = Tspi_Context_GetKeyByUUID(hContext,
TSS_PS_TYPE_SYSTEM,
uuid,
&hIdentKey);

result = Tspi_Key_LoadKey(hIdentKey, hSRK);

However, presumably LoadKeyByUUID should perform the same steps as the two functions above, so this seems like a bug with LoadKeyByUUID.

Discussion

  • Bryan
    Bryan
    2009-02-10

    Sorry, just to clarify, TQD is the program that invokes Tspi_Context_LoadKeyByUUID, which is what prompts TCSD to send a LoadKey command with a tag set for no authentication.

     
  • Rajiv Andrade
    Rajiv Andrade
    2009-07-27

    • assigned_to: kyoder --> kyoder