Hi Sourajit,

 

The tpm2-tools project has a tool for decoding the response code reported by libtss2-esys in the message you’ve provided. Eventually the libraries will do the decoding for you, but for now you must manually run the response codes through this tool: https://github.com/tpm2-software/tpm2-tools/blob/master/man/tpm2_rc_decode.1.md

 

Philip

 

From: tpm2 [mailto:tpm2-bounces@lists.01.org] On Behalf Of Sourajit Mukhopadhyay
Sent: 5 December, 2018 05:58
To: tpm2@lists.01.org
Subject: [tpm2] Esys_CreatePrimary works with Simulator but failing with /dev/tpm0

 

Dear team,

 

I am trying to create a primary key using Esys_CreatePrimary. The code works without any issues when trying on the simulator, but fails when trying on a hardware TPM using /dev/tpm0 

 

The error I am getting is:

WARNING:esys:src/tss2-esys/api/Esys_CreatePrimary.c:423:Esys_CreatePrimary_Finish() Received TPM Error 

ERROR:esys:src/tss2-esys/api/Esys_CreatePrimary.c:164:Esys_CreatePrimary() Esys Finish ErrorCode (0x000001c2) 

Esys_CreatePrimary fail

 

Can someone point out why I am getting this error? So far I am unable to pinpoint the problem.

 

Best regards,

Sourajit Mukhopadhyay