Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add implementation of AESM client for SGX #222

Merged
merged 1 commit into from
Mar 23, 2020
Merged

Add implementation of AESM client for SGX #222

merged 1 commit into from
Mar 23, 2020

Conversation

parthsane
Copy link
Contributor

The implementation of AESM for SGX takes in a TcpStream for its constructor.
It omits the get_launch_token functionality

aesm-client/src/imp/sgx.rs Outdated Show resolved Hide resolved
@parthsane parthsane force-pushed the pvs/sgx-aesm branch 4 times, most recently from 0eeeea2 to cf9c8e5 Compare March 19, 2020 16:35
.travis.yml Outdated Show resolved Hide resolved
aesm-client/src/imp/unix.rs Show resolved Hide resolved
#[derive(Default, Debug, Clone)]
pub struct AesmClient {
inner: imp::AesmClient
}

// TODO: Find a better alternative to removing Clone and Default trait
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use cfg_attr

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete comment

aesm-client/src/lib.rs Outdated Show resolved Hide resolved
aesm-client/src/lib.rs Outdated Show resolved Hide resolved
aesm-client/src/imp/unix.rs Show resolved Hide resolved
aesm-client/src/imp/sgx.rs Outdated Show resolved Hide resolved
aesm-client/src/imp/sgx.rs Outdated Show resolved Hide resolved
.travis.yml Outdated Show resolved Hide resolved
aesm-client/src/lib.rs Outdated Show resolved Hide resolved
@parthsane parthsane force-pushed the pvs/sgx-aesm branch 2 times, most recently from 465f139 to 3a0c541 Compare March 22, 2020 15:20
Copy link
Member

@jethrogb jethrogb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok this looks better, some small cleanup needed.

.travis.yml Outdated
@@ -55,4 +56,4 @@ matrix:
- cargo test --verbose -p sgxs
- cargo test --verbose -p sgxs-loaders
- cargo test --verbose -p sgxs-tools --features pe2sgxs --bin isgx-pe2sgx -Z package-features

- cargo build --verbose -p aesm-client
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate of line 49?

#[derive(Default, Debug, Clone)]
pub struct AesmClient {
inner: imp::AesmClient
}

// TODO: Find a better alternative to removing Clone and Default trait
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete comment

}

// FIXME: remove conditional compilation after resolving https://github.com/fortanix/rust-sgx/issues/31
#[cfg(not(target_env = "sgx"))]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just do this conditional inline (as in get_quote). You can apply #[allow(unused_mut)] on the binding.

This commit allows for using the AESM client from inside the enclave

Add building of aesm for SGX target on linux in CI

Add tests to build aesm-client during CI for all platforms

Added a common aesm_proto mod for sgx and unix
@jethrogb
Copy link
Member

bors r+

@bors
Copy link
Contributor

bors bot commented Mar 23, 2020

Build succeeded

  • continuous-integration/travis-ci/push

@bors bors bot merged commit 1cdc64a into master Mar 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants