intel / intel/confidential-computing.tee.dcap
ERROR: Quote Verification failed: 0xe002
- Dominant language
- C
- Stars
- 326
- Forks
- 198
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I have a python function which creates a pointer to the raw bytes of a TDX quote like so:
`cdef unsigned char* quote_ptr = tdx_quote`.
This pointer is then passed to a C function which expects the quote pointer as a CK_BYTE_PTR object.
This function then performs some other operations like getting the supplemental data size before calling the tdx_qv_verify_quote function:
`tdx_qv_verify_quote((uint8_t *)quote_ptr, (uint32_t)quote_size,
/*p_quote_collateral=*/NULL,
c_time, &collateral_expiration_status,
&verification_result,
/*p_qve_report_info=*/NULL, supp_data_size,
supp_data);`
Which results in 'ERROR: Quote Verification failed: 0xe002'. I checked the documentation and this error is SGX_QL_ERROR_INVALID_PARAMETER and indicates the quote should not be null.
I stepped back through the code to check the pointer value and found when it is initialized in the python function the value is '48 130 4 240 48 130 4 150 160 3 2 1 2 2 20 2 123 141 24 240 48' but when I check again in my C function the value is '48' so I guess I am initializing or passing the pointer incorrectly.
I have similar functions for handling of an SGX quote where the pointer is created the same way as TDX:
`cdef unsigned char* quote_ptr = sgx_quote` and passed as a CK_BYTE_PTR to function which calls sgx_qv_verify_quote.
`sgx_qv_verify_quote((uint8_t *)quote_ptr, (uint32_t)quote_size,
/*p_quote_collateral=*/NULL,
c_time, &collateral_expiration_status,
&verification_result,
/*p_qve_report_info=*/NULL, supp_data_size,
supp_data);`
When I checked the value of the SGX pointer I found it was '3' on initilization and '3' again after being passed to my C function. I also do not see 'ERROR: Quote Verification failed: 0xe002' when calling sgx_qv_verify_quote.
Do TDX quotes need to be handled/stored differently compared to SGX quotes?
Thank you!
Contributor guide
Assessment
This issue has not been assessed yet.