forked from fortanix/rust-sgx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jethro Beekman
committed
Sep 21, 2020
1 parent
38513c9
commit 00f518e
Showing
11 changed files
with
63 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
use aesm_client::AesmClient; | ||
#[cfg(target_os = "windows")] | ||
use sgxs_loaders::enclaveapi; | ||
#[cfg(target_os = "linux")] | ||
use sgxs_loaders::isgx; | ||
use sgxs_loaders::sgx_enclave_common; | ||
|
||
macro_rules! test_loader { | ||
($loader:expr) => { | ||
let mut loader = $loader | ||
.expect("enclave loader initialization error") | ||
.einittoken_provider(AesmClient::new()) | ||
.build(); | ||
|
||
report_test::report(&Default::default(), &mut loader).expect("error getting report"); | ||
} | ||
} | ||
|
||
#[cfg_attr(not(target_os = "windows"), ignore)] | ||
#[test] | ||
fn enclaveapi() { | ||
#[cfg(target_os = "windows")] | ||
test_loader!(enclaveapi::Sgx::new()); | ||
} | ||
|
||
#[cfg_attr(not(target_os = "linux"), ignore)] | ||
#[test] | ||
fn sgxdevice() { | ||
#[cfg(target_os = "linux")] | ||
test_loader!(isgx::Device::new()); | ||
} | ||
|
||
#[cfg_attr(feature = "no_sgx_enclave_common", ignore)] | ||
#[test] | ||
fn sgx_enclave_common() { | ||
eprintln!("NOTE: As of September 2020, this loader doesn't support launch tokens, due to missing support in the Intel library."); | ||
test_loader!(sgx_enclave_common::Library::load(None)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters