Closed hi-T0day closed 4 years ago
So I did some tests and got a solution. I rewrite the sgx_tcrypto_helper in rust sgx sdk. Here is the code: My update. I just copy the source code form sgx_crypto_helper into sgx_tcrypto_helper and change the compile path in Cargo.toml.
I add sgx_crypto_helper = { git = "https://github.com/hi-T0day/incubator-teaclave-sgx-sdk" }
in the file: third_party/crates-sgx/Cargo.toml
.
The compiling and running result show sgx_tcrypto_helper can be used now.
If there is no other solution for this problem. I will pull request this.
@mssun I think we can do this. how do you think?
Thanks @hi-T0day. The main cause of this problem is that sgx_crypto_helper
is not implemented in a way that both app and sgx can use. And I just checked, making it support both targets may introduce a lot of changed on the crypto related libraries. I think your solution can be a temporary work around. If later we can share code in both targets, that will make maintenance more easier, especially for the crypto.
Thanks, please submit PR on your changes. We can later discuss on how to provide a more universal crates.
@hi-T0day Thanks for contribution!
crates-sgx has been updated with correct sgx_tcrypto_helper https://github.com/mesalock-linux/crates-sgx/commit/466fe3cd1569617ca4cbecff9e3c25b736879abf
Please create a PR to update submodule rust-sgx-sdk and crates-sgx
btw, i strongly recommend you to sign your commit using GPG like
git commit -S -m "This is the commit message"
and then get your commit "verified" by github.
Please follow these instructions to create a GPG keypair, then upload the public key to Github and sign your commits.
https://help.github.com/en/enterprise/2.17/user/authenticating-to-github/generating-a-new-gpg-key https://help.github.com/en/github/authenticating-to-github/telling-git-about-your-signing-key https://help.github.com/en/github/authenticating-to-github/signing-commits
Error:
One of the rust-sgx-sdk crates: sgx_tcrypto_helper can not be compiled when I code the sgx_trusted_worker.
step1:
I add this line
sgx_tcrypto_help = { version = "1.1.0" }
in the file:mesatee_services/fns/sgx_trusted_lib/Cargo.toml
. Here is the error:step2:
So I add
sgx_crypto_helper = { git = "https://github.com/apache/teaclave-sgx-sdk", rev = "v1.1.0" }
in the file:third_party/crates-sgx/Cargo.toml
Next,make all
in this folder. An error occurs again: