intel / SGXDataCenterAttestationPrimitives

Other
279 stars 166 forks source link

QuoteGeneration sample code: error returned from the p_sgx_get_quote_config API. 0xe011 #216

Closed giantcroc closed 2 years ago

giantcroc commented 2 years ago

When I run QuoteGeneration sample code, there is an error:

sgx_qe_set_enclave_load_policy is valid in in-proc mode only and it is optional: the default enclave load policy is persistent: 
set the enclave load policy as persistent:succeed!

Step1: Call sgx_qe_get_target_info:[get_platform_quote_cert_data ../qe_logic.cpp:347] Error returned from the p_sgx_get_quote_config API. 0xe011
Error in sgx_qe_get_target_info. 0xe011

the log of pccs.service:

Mar 03 12:23:45 sgx02 node[2508568]: 2022-03-03 12:23:45.141 [info]: 127.0.0.1 - - [03/Mar/2022:04:23:45 +0000] "GET /sgx/certification/v3/pckcert?qeid=90E6C8232D2BF96E445D>
Mar 03 12:26:48 sgx02 node[2508568]: 2022-03-03 12:26:48.428 [info]: Client Request-ID : 8811d1435e1e4b9792cc35623543fd43
Mar 03 12:26:50 sgx02 node[2508568]: 2022-03-03 12:26:50.114 [info]: Request-ID is : bf073f1ef60c4e57bd2e88f608ff07d6
Mar 03 12:26:50 sgx02 node[2508568]: 2022-03-03 12:26:50.114 [error]: Error: No cache data for this platform.
Mar 03 12:26:50 sgx02 node[2508568]:     at Proxy.getPckCertFromPCS (/opt/intel/sgx-dcap-pccs/services/logic/commonCacheLogic.js:86:11)
Mar 03 12:26:50 sgx02 node[2508568]:     at processTicksAndRejections (internal/process/task_queues.js:95:5)
Mar 03 12:26:50 sgx02 node[2508568]:     at async LazyCachingMode.getPckCertFromPCS (/opt/intel/sgx-dcap-pccs/services/caching_modes/cachingMode.js:126:12)
Mar 03 12:26:50 sgx02 node[2508568]:     at async Proxy.getPckCert (/opt/intel/sgx-dcap-pccs/services/pckcertService.js:115:16)
Mar 03 12:26:50 sgx02 node[2508568]:     at async getPckCert (/opt/intel/sgx-dcap-pccs/controllers/pckcertController.js:77:25)
Mar 03 12:26:50 sgx02 node[2508568]: 2022-03-03 12:26:50.117 [info]: 127.0.0.1 - - [03/Mar/2022:04:26:50 +0000] "GET /sgx/certification/v3/pckcert?qeid=90E6C8232D2BF96E445D>

And log of aesmd.service:

Mar 03 11:05:06 sgx02 systemd[1]: Starting Intel(R) Architectural Enclave Service Manager...
Mar 03 11:05:06 sgx02 usermod[2118040]: add 'aesmd' to group 'sgx_prv'
Mar 03 11:05:06 sgx02 usermod[2118040]: add 'aesmd' to shadow group 'sgx_prv'
Mar 03 11:05:06 sgx02 systemd[1]: Started Intel(R) Architectural Enclave Service Manager.
Mar 03 11:05:06 sgx02 aesm_service[2118059]: The server sock is 0x56527272e810
Mar 03 11:36:42 sgx02 aesm_service[2118059]: [QPL] No certificate data for this platform.
Mar 03 11:36:42 sgx02 aesm_service[2118059]: [get_platform_quote_cert_data ../qe_logic.cpp:347] Error returned from the p_sgx_get_quote_config API. 0xe011

cpuid looks like:

SGX: Software Guard Extensions supported = true
      SGX_LC: SGX launch config supported      = true
   Software Guard Extensions (SGX) capability (0x12/0):
      SGX1 supported                         = true
      SGX2 supported                         = true
      SGX ENCLV E*VIRTCHILD, ESETCONTEXT     = false
      SGX ENCLS ETRACKC, ERDINFO, ELDBC, ELDUC = false
   SGX attributes (0x12/1):
   SGX EPC enumeration (0x12/n):
      SGX: Software Guard Extensions supported = true
      SGX_LC: SGX launch config supported      = true
   Software Guard Extensions (SGX) capability (0x12/0):
      SGX1 supported                         = true
      SGX2 supported                         = true
      SGX ENCLV E*VIRTCHILD, ESETCONTEXT     = false
      SGX ENCLS ETRACKC, ERDINFO, ELDBC, ELDUC = false

Please help me, thanks.

jsun39 commented 2 years ago

If your platform is based on server CPUs, please make sure you have done registration successfully.

giantcroc commented 2 years ago

If your platform is based on server CPUs, please make sure you have done registration successfully.

It works, thanks.

TY-cc commented 2 years ago

I have same problem. How do you slove it for more details?

MikhailMalkov commented 2 weeks ago

I have same problem too. Pls help.