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
if I try to verify a X509 certificate with the tpm2 provider I get the following error output:
PROVIDER INIT
Loaded tpm2 provider
Loaded default provider
DER DECODER DECODE
TSS2 DECODER DECODE 0x87
TSS2 DECODER LOAD parent: primary 0x40000001
TSS2 DECODER DECODE 0x87
TSS2 DECODER LOAD parent: primary 0x40000001
TSS2 DECODER DECODE 0x87
TSS2 DECODER LOAD parent: primary 0x40000001
TSS2 DECODER DECODE found RSA
RSA LOAD
RSA GET_PARAMS [ bits security-bits max-size ]
RSA HAS 85
SIGN DIGEST_INIT rsa MD=SHA256
SIGN DIGEST_START
SIGN DIGEST_UPDATE
ERROR:esys:api\Esys_ContextSave.c:251:Esys_ContextSave_Finish() Received a non-TPM Error
ERROR:esys:api\Esys_ContextSave.c:92:Esys_ContextSave() Esys Finish ErrorCode (0x80280400)
ERROR:esys:esys_iutil.c:1218:iesys_check_sequence_async() Esys called in bad sequence.
ERROR:esys:api\Esys_FlushContext.c:66:Esys_FlushContext() Error in async function ErrorCode (0x00070007)
verify x509 failed: error:40000013:tpm2::cannot duplicate context
RSA FREE
ERROR:esys:esys_iutil.c:1218:iesys_check_sequence_async() Esys called in bad sequence.
ERROR:esys:api\Esys_FlushContext.c:66:Esys_FlushContext() Error in async function ErrorCode (0x00070007)
There is no difference if I use a certificate created programmatically or via openssl.exe. I use the following command to create my certificate: openssl req -provider-path . -provider tpm2 -provider default -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 365
This is the stack when the error happens:
And this is the exact position in the tpm code, Tss2_Sys_Execute.c line 140 in function Tss2_Sys_ExecuteFinish:
I have tested the same code in a Ubuntu VM (simulated TPM2) with the tpm2-openssl package and the verify works as expected.
The text was updated successfully, but these errors were encountered:
Hi,
if I try to verify a X509 certificate with the tpm2 provider I get the following error output:
There is no difference if I use a certificate created programmatically or via openssl.exe. I use the following command to create my certificate:
openssl req -provider-path . -provider tpm2 -provider default -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 365
This is the stack when the error happens:
![grafik](https://private-user-images.githubusercontent.com/57151725/239966915-c552f534-7d82-407b-91bd-3192785399f9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5OTU0MDYsIm5iZiI6MTczODk5NTEwNiwicGF0aCI6Ii81NzE1MTcyNS8yMzk5NjY5MTUtYzU1MmY1MzQtN2Q4Mi00MDdiLTkxYmQtMzE5Mjc4NTM5OWY5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDA2MTE0NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUzN2M1OWNiZDFmYzJmMTA0ZjMxMzE1OGFiZGU0OWE3MmYzM2ZhZTQ1ODAxOWY1ZDlkMjUwZTZmZmJjNjJhNDImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.AGM3MQ4LM_6NQCyzqEMsSnktnCSsGEEXREV5OwSmW8I)
And this is the exact position in the tpm code,
![grafik](https://private-user-images.githubusercontent.com/57151725/239967334-268439c3-7d37-445c-bfc5-77464a25ae10.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5OTU0MDYsIm5iZiI6MTczODk5NTEwNiwicGF0aCI6Ii81NzE1MTcyNS8yMzk5NjczMzQtMjY4NDM5YzMtN2QzNy00NDVjLWJmYzUtNzc0NjRhMjVhZTEwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDA2MTE0NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY4NWMwM2MwYTRiOWMxMjVkYWZlYjQ2ODBjOTRiZGIyYjVhN2VmM2MyZGFkNWUzZWQzNjczNTU3ZmFlODY4ODEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.hPEwd-nXm9DAhHQdQO6ehEeTb0tPcdg65j9KO41AsNU)
Tss2_Sys_Execute.c
line 140 in functionTss2_Sys_ExecuteFinish
:I have tested the same code in a Ubuntu VM (simulated TPM2) with the tpm2-openssl package and the verify works as expected.
The text was updated successfully, but these errors were encountered: