intel / sgx-ra-sample

Other
178 stars 65 forks source link

Sample code can not be run on Windows correctly #55

Closed makurasama closed 4 years ago

makurasama commented 4 years ago

I can not run sample code correctly by following the steps written on readme. Hope you can give me valuable advice.

Question 1: The Intel IAS SGX Report Signing CA file still should be set in setting.cmd. However, It seems this file can not be obtained anymore. I found this problem has been mentioned in other issues, and you give a file Intel_SGX_Attestation_RootCA.pem as a solution. Then, I use this file to run. However, I want to ask have you fix the problem that the Intel IAS SGX Report Signing CA is not used.

Question 2: When I do "run-client 127.0.0.1:7777", the enclave can't be created. (In the following, xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx represents my SPID and Subscription key)

C:\Users\fengj\source\test\sgx-ra-sample\vs>run-client 127.0.0.1:7777

C:\Users\fengj\source\test\sgx-ra-sample\vs>C:\Users\fengj\source\test\sgx-ra-sample\vs\x64\Debug\client.exe -s xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -r   -v  127.0.0.1:7777
sgx_create_enclave: Enclave.signed.dll: 0000200f
Press any key to continue . . .

When I do run-server policy.cmd seems not to be automatically generated.

>run-server
'policy.cmd' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\fengj\source\test\sgx-ra-sample\vs>C:\Users\fengj\source\test\sgx-ra-sample\vs\x64\Debug\sp.exe -i xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -j xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -s xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -A C:\Users\fengj\source\test\sgx-ra-sample\Intel_SGX_Attestation_RootCA.pem     -X -v
--isv-product-id is required
--min-isvsvn is required
--mrsigner is required
usage: sp [ options ] [ port ]
Required:
  -A, --ias-signing-cafile=FILE
                           Specify the IAS Report Signing CA file.

  -N, --mrsigner=HEXSTRING
                           Specify the MRSIGNER value of encalves that
                           are allowed to attest. Enclaves signed by
                           other signing keys are rejected.
...

How can I fix the above problem ?

makurasama commented 4 years ago

I can not run sample code correctly by following the steps written on readme. Hope you can give me valuable advice.

Question 1: The Intel IAS SGX Report Signing CA file still should be set in setting.cmd. However, It seems this file can not be obtained anymore. I found this problem has been mentioned in other issues, and you give a file Intel_SGX_Attestation_RootCA.pem as a solution. Then, I use this file to run. However, I want to ask have you fix the problem that the Intel IAS SGX Report Signing CA is not used.

Question 2: When I do "run-client 127.0.0.1:7777", the enclave can't be created. (In the following, xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx represents my SPID and Subscription key)

C:\Users\fengj\source\test\sgx-ra-sample\vs>run-client 127.0.0.1:7777

C:\Users\fengj\source\test\sgx-ra-sample\vs>C:\Users\fengj\source\test\sgx-ra-sample\vs\x64\Debug\client.exe -s xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -r   -v  127.0.0.1:7777
sgx_create_enclave: Enclave.signed.dll: 0000200f
Press any key to continue . . .

When I do run-server policy.cmd seems not to be automatically generated.

>run-server
'policy.cmd' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\fengj\source\test\sgx-ra-sample\vs>C:\Users\fengj\source\test\sgx-ra-sample\vs\x64\Debug\sp.exe -i xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -j xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -s xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -A C:\Users\fengj\source\test\sgx-ra-sample\Intel_SGX_Attestation_RootCA.pem     -X -v
--isv-product-id is required
--min-isvsvn is required
--mrsigner is required
usage: sp [ options ] [ port ]
Required:
  -A, --ias-signing-cafile=FILE
                           Specify the IAS Report Signing CA file.

  -N, --mrsigner=HEXSTRING
                           Specify the MRSIGNER value of encalves that
                           are allowed to attest. Enclaves signed by
                           other signing keys are rejected.
...

How can I fix the above problem ?