Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/algorithm/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux SGX Sign enclave无法证明生成的enclave:密钥文件格式不正确_Linux_Intel_Sgx - Fatal编程技术网

Linux SGX Sign enclave无法证明生成的enclave:密钥文件格式不正确

Linux SGX Sign enclave无法证明生成的enclave:密钥文件格式不正确,linux,intel,sgx,Linux,Intel,Sgx,我设法生成了我的Enclave,但据我所知,我需要生成一个rsa密钥才能对其进行签名。所以我跑: openssl genrsa -out $(KEY_FILE) 2048 然后我运行以下命令对其进行签名: sgx_sign -key (^key_generated)above^ -enclave enclave.o -out enclave.so -config Enclave.config.xml 但我得到了以下错误: 密钥文件格式不正确 编辑2: 我试图通过ssh_keygen生成密钥,

我设法生成了我的Enclave,但据我所知,我需要生成一个rsa密钥才能对其进行签名。所以我跑:

openssl genrsa -out $(KEY_FILE) 2048
然后我运行以下命令对其进行签名:

sgx_sign -key (^key_generated)above^ -enclave enclave.o -out enclave.so -config Enclave.config.xml
但我得到了以下错误:

密钥文件格式不正确

编辑2: 我试图通过ssh_keygen生成密钥,但仍然出现相同的错误

签署飞地需要什么样的格式

编辑3: 我还尝试使用以下方法生成密钥:

openssl-req-x509-nodes-days 365-newkey rsa:2048-keyout~/.sgx/MyEnclave.pem

仍然相同的结果指定SGX enclave签名密钥文件应遵循PEM格式,该格式包含未加密的RSA 3072位密钥,公共指数必须为3

有关生成私钥的以下命令行,请参见2017年11月2.0版-OpenSSL示例第20页: openssl genrsa-out private_key.pem-3 3072