I am a novice in Intel SGX SDK so before trying to build my application around Intel SGX I tried to put my hand dirty into the SampleEnclave project found on C:\Program Files (x86)\Intel\IntelSGXSDK\src. I am trying to sign the enclave using cmd. I put the command " sgx_sign gendata ‑enclave Enclave.sign.dll -out enclave_hash.hex" and run it but I end up with the error as below:
Failed to open file " Enclave.signed.dll"
Error happened while signing enclave.
I am trying to figure it out what is going wrong but could not find any reason since the File "Enclave.signed.dll" happens to be in the directory
It appears you're trying to use the "gendata" sgx_sign command on an enclave that has already been signed. "Gendata" is used as the first step in the two-part signing process and is supposed to take an unsigned enclave as input to the -enclave parameter.
For more info see the link below or the "Enclave Signing Tool" section in the SGX SDK Developer Reference.