diff --git a/Cargo.toml b/Cargo.toml index f17d726..108d7cb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ # All rights reserved. [package] -name = "occlum-sgx" +name = "detee-sgx" version = "0.1.0" edition = "2021" authors = ["Valentyn Faychuk "] diff --git a/README.md b/README.md index 6bde319..cb0df86 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,13 @@ # Occlum SGX Remote Attestation integrated in TLS connection and many more +## Requirements to run + +* The library is intended to be used from within an enclave +* The library depends on the extension present in /dev/sgx +* The library must run on top of the occlum libos + +## The flow + The MRSIGNER of the `example/signing_key.pem` is hardcoded in the enclave code: ``` @@ -60,14 +68,14 @@ Run the occlum image in the docker environment: ```bash # Notice that there is no SGX device mounted -docker run --rm -it -v /path/to/occlum-sgx:/root/occlum-sgx occlum/occlum:latest-ubuntu20.04 +docker run --rm -it -v /path/to/detee-sgx:/root/detee-sgx occlum/occlum:latest-ubuntu20.04 # Inside the docker container do env preparation to build the image rustup install stable-x86_64-unknown-linux-gnu rustup default stable rustup target add x86_64-unknown-linux-musl # Build the server and the client -cd occlum-sgx +cd detee-sgx ./build_server.sh grpcs ./build_client.sh grpcs ``` diff --git a/src/bindings.rs b/src/bindings.rs index 084b86e..2376b85 100644 --- a/src/bindings.rs +++ b/src/bindings.rs @@ -1960,6 +1960,8 @@ pub type uint16_t = u16; pub type uint32_t = u32; pub type uint64_t = u64; pub type size_t = usize; + +// Occlum dcap library, occlum/tools/toolchains/dcap_lib extern "C" { pub fn dcap_quote_open() -> *mut ::std::os::raw::c_void; pub fn dcap_get_quote_size(handle: *mut ::std::os::raw::c_void) -> u32; @@ -1981,7 +1983,7 @@ extern "C" { pub fn dcap_quote_close(handle: *mut ::std::os::raw::c_void); } -// occlum_utils occlum-detee/tools/toolchains/utils_lib +// Occlum utilities library, occlum/tools/toolchains/utils_lib extern "C" { pub fn utils_ioctl_open() -> *mut ::std::os::raw::c_void; pub fn utils_gen_key(