Hello, I have a SGX application that attests and communicates via HTTPS. One major problem I encountered is that I can not safely load my certificate and my key into the enclave. I thought about leaving a hardcoded key that decrypts the certificate and key, and I would use it myself to encrypt it from the outside. As discussed earlier (https://software.intel.com/en-us/forums/intel-software-guard-extensions-intel-sgx/topic/738239), it is possible for someone to get sensitive data encoded within the enclave.
To be able to securely provision data (ie. keys, certificates, etc) to your enclave, you need to use SGX remote attestation. Once you successfully attest that your enclave is running on a remote system, you can send the data you'd like in a secure fashion to it.
For more information, see this link: https://software.intel.com/en-us/articles/code-sample-intel-software-guard-extensions-remote-attesta...