This commit is contained in:
Valentyn Faychuk 2024-10-27 14:56:47 +02:00
parent 2cd8fc0e56
commit e782423ffd
Signed by: valy
GPG Key ID: F1AB995E20FEADC5
3 changed files with 14 additions and 4 deletions

@ -2,7 +2,7 @@
# All rights reserved.
[package]
name = "occlum-sgx"
name = "detee-sgx"
version = "0.1.0"
edition = "2021"
authors = ["Valentyn Faychuk <faitchouk.valentyn@gmail.com>"]

@ -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
```

@ -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(