From cf9c8e50543a133661d1c2fe75f4bb8201d713fa Mon Sep 17 00:00:00 2001 From: Parth Sane Date: Thu, 19 Mar 2020 21:02:21 +0530 Subject: [PATCH] Add building of aesm for SGX target on linux in CI --- .travis.yml | 2 +- aesm-client/src/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index ebf132ee..0b78765a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,6 +32,7 @@ matrix: - cargo test --verbose -p sgx-isa --features sgxstd -Z package-features --target x86_64-fortanix-unknown-sgx --no-run - cargo test --verbose -p sgxs-tools --features pe2sgxs --bin isgx-pe2sgx -Z package-features - cargo test --verbose -p dcap-ql --features link -Z package-features + - pushd aesm-client/ && cargo build --target=x86_64-fortanix-unknown-sgx && popd - os: windows before_install: @@ -55,4 +56,3 @@ 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 - diff --git a/aesm-client/src/lib.rs b/aesm-client/src/lib.rs index 861c7a01..9acb5541 100644 --- a/aesm-client/src/lib.rs +++ b/aesm-client/src/lib.rs @@ -37,7 +37,7 @@ use std::net::TcpStream; use protobuf::ProtobufResult; #[cfg(feature = "sgxs")] use sgxs::einittoken::{Einittoken, EinittokenProvider}; -#[cfg(feature = "sgxs")] +#[cfg(not(target_env = "sgx"))] use sgx_isa::{Attributes, Sigstruct}; include!(concat!(env!("OUT_DIR"), "/mod_aesm_proto.rs")); @@ -212,7 +212,7 @@ impl AesmClient { ) } - #[cfg(feature = "sgxs")] + #[cfg(not(target_env = "sgx"))] pub fn get_launch_token( &self, sigstruct: &Sigstruct,