Thanks, William and Imran. I’ll have a look at using your suggestion instead.

 

From: Desai, Imran <imran.desai@intel.com>
Sent: 27 June 2022 00:32
To: Roberts, William C <william.c.roberts@intel.com>; Shaw, Adrian <adrian.shaw@hp.com>; tpm2@lists.01.org
Subject: Re: Using a session with TPM2_CreatePrimary

 

That’s right, it needs to be added for createprimary. Having said that, if your tpm supports createloaded, you can use tpm2_create tool  to create a primary object as well.


From: Roberts, William C <william.c.roberts@intel.com>
Sent: Sunday, June 26, 2022 3:31:56 PM
To: Shaw, Adrian <adrian.shaw@hp.com>; tpm2@lists.01.org <tpm2@lists.01.org>; Desai, Imran <imran.desai@intel.com>
Subject: Re: Using a session with TPM2_CreatePrimary

 

I'm pretty sure it's just missing; we haven't enabled session support throughout all the tools yet. Imran am I correct?


From: Shaw, Adrian <adrian.shaw@hp.com>
Sent: Wednesday, June 22, 2022 12:10 PM
To: tpm2@lists.01.org <tpm2@lists.01.org>
Subject: [tpm2] Using a session with TPM2_CreatePrimary

 

Hi everyone,

 

I’m trying to create a primary key using an authenticated and encrypted session.

 

I looked at the man page for tpm2_createprimary https://github.com/tpm2-software/tpm2-tools/blob/1226b5333e0f051edf67739743a68f668f9ba07a/man/tpm2_createprimary.1.md

 

It does not seem to be possible - there is no way to specify the session to use. 

 

However, it is possible to do this in the IBM TSS equivalent https://www.mankier.com/1/tsscreateprimary

 

I noticed you can specify a session for other commands though, like tpm2_create, but not with tpm2_createprimary.

 

Is this a missing feature or am I missing some fundamental understanding?

 

Thanks,

Adrian