uname -a
yum update kernel
/opt/intel/sgx-aesm-service。yum install \\libsgx-ae-le libsgx-ae-pce libsgx-ae-qe3 libsgx-ae-qve \\libsgx-aesm-ecdsa-plugin libsgx-aesm-launch-plugin libsgx-aesm-pce-plugin libsgx-aesm-quote-ex-plugin \\libsgx-dcap-default-qpl libsgx-dcap-default-qpl-devel libsgx-dcap-ql libsgx-dcap-ql-devel \\libsgx-dcap-quote-verify libsgx-dcap-quote-verify-devel libsgx-enclave-common libsgx-enclave-common-devel libsgx-epid-devel \\libsgx-launch libsgx-launch-devel libsgx-pce-logic libsgx-qe3-logic libsgx-quote-ex libsgx-quote-ex-devel \\libsgx-ra-network libsgx-ra-uefi libsgx-uae-service libsgx-urts sgx-ra-service \\sgx-aesm-service -y
wget https://mia-1251783334.cos.ap-shanghai.myqcloud.com/sgx_linux_x64_sdk_2.23.100.2.bin -O sgx_linux_x64_sdk_2.23.100.2.binchmod +x ./sgx_linux_x64_sdk_2.23.100.2.bin./sgx_linux_x64_sdk_2.23.100.2.bin
./sgx_linux_x64_sdk时,需要选择安装目录,建议不要安装到当前目录,安装到/opt/intel/。此时,Intel SGXSDK 的默认安装目录为/opt/intel/sgxsdk。您可参见 Intel SGXSDK 用户手册开发 SGX 程序。地域 | [Region-ID] |
北京 | bj |
上海 | sh |
广州 | gz |
南京 | nj |
新加坡 | sg |
/etc/sgx_default_qcnl.conf/etc/sgx_default_qcnl.conf/etc/sgx_default_qcnl.conf属于 rpm 包 libsgx-dcap-default-qpl,其格式同时支持 toml 与 JSON 文件两种格式,下文将介绍两种情况下如何配置。/etc/sgx_default_qcnl.conf,找到pccs_url,将该行修改为如下内容:"pccs_url": "https://sgx-dcap-server-tc.[Region-ID].tencent.cn/sgx/certification/v4/"
"pccs_url": "https://sgx-dcap-server-tc.bj.tencent.cn/sgx/certification/v4/"
/etc/sgx_default_qcnl.conf:使用 VIM 编辑器,将 /etc/sgx_default_qcnl.conf 修改为如下内容:# PCCS server addressPCCS_URL=https://sgx-dcap-server-tc.[Region-ID].tencent.cn/sgx/certification/v4/# To accept insecure HTTPS cert, set this option to FALSEUSE_SECURE_CERT=TRUE
# PCCS server addressPCCS_URL=https://sgx-dcap-server-tc.bj.tencent.cn/sgx/certification/v4/# To accept insecure HTTPS cert, set this option to FALSEUSE_SECURE_CERT=TRUE
/opt/intel/sgxsdk/SampleCode。本示例中的代码(SampleEnclave)效果为启动一个 Enclave,以验证是否正常使用安装的 SGXSDK,以及 SGX 云服务器实例的机密内存资源是否可用。source /opt/intel/sgxsdk/environment
cd /opt/intel/sgxsdk/SampleCode/SampleEnclave && make
./app

source /opt/intel/sgxsdk/environment
cd /root && yum install git -y
git clone https://github.com/intel/SGXDataCenterAttestationPrimitives.gitgit checkout DCAP_1.20
cd /root/SGXDataCenterAttestationPrimitives/SampleCode/QuoteGenerationSample
make
./app
cd /root/SGXDataCenterAttestationPrimitives/SampleCode/QuoteVerificationSample && make
sgx_sign sign -key Enclave/Enclave_private_sample.pem -enclave enclave.so -out enclave.signed.so -config Enclave/Enclave.config.xmlsgx_sign sign -key ../QuoteGenerationSample/Enclave/Enclave_private_sample.pem -enclave enclave.so -out enclave.signed.so -config Enclave/Enclave.config.xml # DCAP_1.16新版本路径
./app

文档反馈