Skip to content

Commit 4b102ce

Browse files
authored
Modified the nitro-enclave crate to work inside the workspace (#4)
2 parents bc492ee + db7d897 commit 4b102ce

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

nitro-enclave/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ err-derive = "0.2"
99
nix = { version = "0.26" }
1010
raw-fd = { path = "../raw-fd" }
1111
serde_json = { version = "1.0", default-features = false }
12+
vsocket = { path = "../vsocket" }
1213

nitro-enclave/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use raw_fd;
1616
use serde_json::Value;
1717
use std::{os::unix::io::AsRawFd, process::Command};
1818

19-
pub mod vsocket;
19+
use vsocket;
2020

2121
/// Errors generated by Nitro enclave components of Veracruz
2222
#[derive(Debug, Error)]
@@ -33,7 +33,7 @@ pub struct NitroEnclave {
3333
/// value
3434
enclave_id: String,
3535
/// A convenience struct for handling VSOCK connections to the enclave
36-
vsocksocket: crate::vsocket::VsockSocket,
36+
vsocksocket: vsocket::VsockSocket,
3737
/// the path to the Nitro CLI function. Not all AMI images have it in the
3838
/// same place in the file system, so we need to keep track of it
3939
nitro_cli_path: String,
@@ -102,7 +102,7 @@ impl NitroEnclave {
102102
};
103103

104104
alarm::set(NITRO_ENCLAVE_CONNECT_TIMEOUT);
105-
let vsocket = crate::vsocket::VsockSocket::connect(cid, port)?;
105+
let vsocket = vsocket::VsockSocket::connect(cid, port)?;
106106
alarm::cancel();
107107

108108
let enclave: Self = NitroEnclave {

0 commit comments

Comments
 (0)