Hello Everybody,

 

I am currently experimenting with the Esys-API and have encountered a problem during the primary key creation.

 

    TPM2B_PUBLIC * primaryOutPublic;

    TPM2B_CREATION_DATA * primaryCreationData;

    TPM2B_DIGEST * primaryCreationHash;

    TPMT_TK_CREATION  * primaryCreationTicket;

    ESYS_TR primaryObjectHandle;

 

    // Create primary key

    rc = Esys_CreatePrimary(esysContext, ESYS_TR_RH_OWNER, ESYS_TR_NONE, ESYS_TR_NONE, ESYS_TR_NONE,

            &primaryInSensitive, &primaryInPublic, &outsideInfo, &creationPCR,

            &primaryObjectHandle, &primaryOutPublic, &primaryCreationData, &primaryCreationHash, &primaryCreationTicket);

 

    if( rc != TSS2_RC_SUCCESS){

        std::cerr << "Creation of primary key failed with " <<

                  "response code: 0x"<< std::hex << rc << std::endl;

        Esys_Finalize(&esysContext);

        return EXIT_FAILURE;

    }

 

 

I get the following error:

 

ERROR:esys:src/tss2-esys/esys_iutil.c:1178:check_session_feasibility() Not enough sessions provided for the command.

ERROR:esys:src/tss2-esys/api/Esys_CreatePrimary.c:208:Esys_CreatePrimary_Async() Check session usage ErrorCode (0x0007000b)

ERROR:esys:src/tss2-esys/api/Esys_CreatePrimary.c:110:Esys_CreatePrimary() Error in async function ErrorCode (0x0007000b)

 

I hope this is enough context for the trained eye, I would be very grateful for help with this issue.

Thank you very much

 

Felix Schick