You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am trying to import the externally create private key of a certificate into the TPM, then export it as TSS2 and re import it again but this does not work.
What I did first, was importing the external key using the tpm-tools:
I was able to use the private key to e.g. create a mTLS session using the uri object:tpm/idevid.hdl with the OSSL provider API.
Then I tried to export the private key via an encoder which gave me a TSS2 private key file that looked fine at the first view.
But when I tried to load the private key from the previously exported TSS2, I got the following error:
WARNING:esys:src/tss2-esys/api/Esys_Load.c:324:Esys_Load_Finish() Received TPM Error
ERROR:esys:src/tss2-esys/api/Esys_Load.c:112:Esys_Load() Esys Finish ErrorCode (0x000001d5)
After that I tried not to persist the imported key by using:
WARNING:esys:src/tss2-esys/api/Esys_EvictControl.c:330:Esys_EvictControl_Finish() Received TPM Error
ERROR:esys:src/tss2-esys/api/Esys_EvictControl.c:114:Esys_EvictControl() Esys Finish ErrorCode (0x00000282)
ERROR: Esys_EvictControl(0x282) - tpm:handle(2):inconsistent attributes
ERROR: Unable to run tpm2_evictcontrol
So my question: What am I doing wrong here or is this even possible?
Another thing that confuses me: When I created a new key using the TPM provider everything just worked. I was able to export it as TSS2 and import it again without any issues.
The text was updated successfully, but these errors were encountered:
@gotthardp Now I added the description. Sorry for that.
Tyrrx
changed the title
Cannot export load exported tss3private
Cannot export externally created private key
Dec 19, 2023
Tyrrx
changed the title
Cannot export externally created private key
Cannot export externally created private key and then import it again
Dec 19, 2023
Hi, I am trying to import the externally create private key of a certificate into the TPM, then export it as TSS2 and re import it again but this does not work.
What I did first, was importing the external key using the tpm-tools:
I was able to use the private key to e.g. create a mTLS session using the uri
object:tpm/idevid.hdl
with the OSSL provider API.Then I tried to export the private key via an encoder which gave me a TSS2 private key file that looked fine at the first view.
But when I tried to load the private key from the previously exported TSS2, I got the following error:
After that I tried not to persist the imported key by using:
And then use the TSS2 file create by the tpm-tools but then I get the error:
Also running:
Gave me the error:
So my question: What am I doing wrong here or is this even possible?
Another thing that confuses me: When I created a new key using the TPM provider everything just worked. I was able to export it as TSS2 and import it again without any issues.
The text was updated successfully, but these errors were encountered: