Skip to content

Commit

Permalink
bump teaclave-sdk to v1.1.6-testing #1074 (#1076)
Browse files Browse the repository at this point in the history
* update rust sgx sdk to v1.1.6-testing, add exact commit hash to script

* Makefile: update pin-sgx

* update toolchain

* update teaclave to 1.1.6-testing

* enclave: update teaclave version

* itp-top-pool: remove attribute `vec_retain_mut` as it has been stable since 1.61.0

* itp-attestation-handler: remove const_err as it is a hard error in Rust now

* clippy fixes

* allow clippy::result_large_err

* fix clippy in enclave-runtime

* fix clippy: feature EVM

* fix clippy Teeracle feature

* clippy: allow or_fun() in fn pruned() as .defaul() is not available in enclave-runtime

* clippy: fix allowed large_enum_variant lint in tls-websocket-server

* clippy: fix large_enum_variant in app-libs/stf

* fix mio and net2 conflicts

* fix needless borrow

* clippy: unused_io_amount

* add explicit revision for sgx_crypto_helper

* Update teaclave explicitly in stf-state-handler

* stf-state-handler: add explicit feature to sgx_crypto_helper

* fixup! fix mio and net2 conflicts

* make sure all teaclave dependency is on the same version
  • Loading branch information
OverOrion authored Nov 8, 2022
1 parent 7f822b8 commit f5674c4
Show file tree
Hide file tree
Showing 43 changed files with 336 additions and 554 deletions.
68 changes: 34 additions & 34 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -566,9 +566,9 @@ dependencies = [

[[package]]
name = "cc"
version = "1.0.74"
version = "1.0.75"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "581f5dba903aac52ea3feb5ec4810848460ee833876f1f9b0fdeab1f19091574"
checksum = "41ca34107f97baef6cfb231b32f36115781856b8f8208e8c580e0bcaea374842"
dependencies = [
"jobserver",
]
Expand Down Expand Up @@ -2000,7 +2000,7 @@ dependencies = [
[[package]]
name = "hashbrown_tstd"
version = "0.12.0"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?tag=v1.1.5#d2d339cbb005f676bb700059bd51dc689c025f6b"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?branch=v1.1.6-testing#9c1bbd52f188f600a212b57c916124245da1b7fd"

[[package]]
name = "hdrhistogram"
Expand Down Expand Up @@ -6441,13 +6441,13 @@ dependencies = [

[[package]]
name = "sgx_alloc"
version = "1.1.5"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?tag=v1.1.5#d2d339cbb005f676bb700059bd51dc689c025f6b"
version = "1.1.6"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?branch=v1.1.6-testing#9c1bbd52f188f600a212b57c916124245da1b7fd"

[[package]]
name = "sgx_backtrace_sys"
version = "1.1.5"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?tag=v1.1.5#d2d339cbb005f676bb700059bd51dc689c025f6b"
version = "1.1.6"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?branch=v1.1.6-testing#9c1bbd52f188f600a212b57c916124245da1b7fd"
dependencies = [
"cc",
"sgx_build_helper",
Expand All @@ -6456,13 +6456,13 @@ dependencies = [

[[package]]
name = "sgx_build_helper"
version = "1.1.5"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?tag=v1.1.5#d2d339cbb005f676bb700059bd51dc689c025f6b"
version = "1.1.6"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?branch=v1.1.6-testing#9c1bbd52f188f600a212b57c916124245da1b7fd"

[[package]]
name = "sgx_crypto_helper"
version = "1.1.5"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?tag=v1.1.5#d2d339cbb005f676bb700059bd51dc689c025f6b"
version = "1.1.6"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?branch=v1.1.6-testing#9c1bbd52f188f600a212b57c916124245da1b7fd"
dependencies = [
"itertools",
"libc",
Expand All @@ -6480,21 +6480,21 @@ dependencies = [

[[package]]
name = "sgx_demangle"
version = "1.1.5"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?tag=v1.1.5#d2d339cbb005f676bb700059bd51dc689c025f6b"
version = "1.1.6"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?branch=v1.1.6-testing#9c1bbd52f188f600a212b57c916124245da1b7fd"

[[package]]
name = "sgx_libc"
version = "1.1.5"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?tag=v1.1.5#d2d339cbb005f676bb700059bd51dc689c025f6b"
version = "1.1.6"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?branch=v1.1.6-testing#9c1bbd52f188f600a212b57c916124245da1b7fd"
dependencies = [
"sgx_types",
]

[[package]]
name = "sgx_rand"
version = "1.1.5"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?tag=v1.1.5#d2d339cbb005f676bb700059bd51dc689c025f6b"
version = "1.1.6"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?branch=v1.1.6-testing#9c1bbd52f188f600a212b57c916124245da1b7fd"
dependencies = [
"sgx_trts",
"sgx_tstd",
Expand All @@ -6503,25 +6503,25 @@ dependencies = [

[[package]]
name = "sgx_tcrypto"
version = "1.1.5"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?tag=v1.1.5#d2d339cbb005f676bb700059bd51dc689c025f6b"
version = "1.1.6"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?branch=v1.1.6-testing#9c1bbd52f188f600a212b57c916124245da1b7fd"
dependencies = [
"sgx_types",
]

[[package]]
name = "sgx_tprotected_fs"
version = "1.1.5"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?tag=v1.1.5#d2d339cbb005f676bb700059bd51dc689c025f6b"
version = "1.1.6"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?branch=v1.1.6-testing#9c1bbd52f188f600a212b57c916124245da1b7fd"
dependencies = [
"sgx_trts",
"sgx_types",
]

[[package]]
name = "sgx_trts"
version = "1.1.5"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?tag=v1.1.5#d2d339cbb005f676bb700059bd51dc689c025f6b"
version = "1.1.6"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?branch=v1.1.6-testing#9c1bbd52f188f600a212b57c916124245da1b7fd"
dependencies = [
"sgx_libc",
"sgx_types",
Expand All @@ -6537,8 +6537,8 @@ dependencies = [

[[package]]
name = "sgx_tstd"
version = "1.1.5"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?tag=v1.1.5#d2d339cbb005f676bb700059bd51dc689c025f6b"
version = "1.1.6"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?branch=v1.1.6-testing#9c1bbd52f188f600a212b57c916124245da1b7fd"
dependencies = [
"hashbrown_tstd",
"sgx_alloc",
Expand All @@ -6553,13 +6553,13 @@ dependencies = [

[[package]]
name = "sgx_types"
version = "1.1.5"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?tag=v1.1.5#d2d339cbb005f676bb700059bd51dc689c025f6b"
version = "1.1.6"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?branch=v1.1.6-testing#9c1bbd52f188f600a212b57c916124245da1b7fd"

[[package]]
name = "sgx_ucrypto"
version = "1.1.5"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?tag=v1.1.5#d2d339cbb005f676bb700059bd51dc689c025f6b"
version = "1.1.6"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?branch=v1.1.6-testing#9c1bbd52f188f600a212b57c916124245da1b7fd"
dependencies = [
"libc",
"rand_core 0.3.1",
Expand All @@ -6569,16 +6569,16 @@ dependencies = [

[[package]]
name = "sgx_unwind"
version = "1.1.5"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?tag=v1.1.5#d2d339cbb005f676bb700059bd51dc689c025f6b"
version = "1.1.6"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?branch=v1.1.6-testing#9c1bbd52f188f600a212b57c916124245da1b7fd"
dependencies = [
"sgx_build_helper",
]

[[package]]
name = "sgx_urts"
version = "1.1.5"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?tag=v1.1.5#d2d339cbb005f676bb700059bd51dc689c025f6b"
version = "1.1.6"
source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?branch=v1.1.6-testing#9c1bbd52f188f600a212b57c916124245da1b7fd"
dependencies = [
"libc",
"sgx_types",
Expand Down Expand Up @@ -7287,7 +7287,7 @@ dependencies = [
[[package]]
name = "sp-std"
version = "4.0.0"
source = "git+https://github.com/paritytech/substrate.git?branch=master#14c3ef3898802eec15a6c4a3a711e002a73fffa1"
source = "git+https://github.com/paritytech/substrate.git?branch=master#14f9fb2e5ec839ae554efb898ab966fa4bb4e14d"

[[package]]
name = "sp-std"
Expand Down
20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,16 @@ members = [
]

[patch."https://github.com/apache/teaclave-sgx-sdk.git"]
sgx_alloc = { version = "1.1.5", git = "https://github.com/apache/incubator-teaclave-sgx-sdk", tag = "v1.1.5" }
sgx_crypto_helper = { version = "1.1.5", git = "https://github.com/apache/incubator-teaclave-sgx-sdk", tag = "v1.1.5" }
sgx_libc = { version = "1.1.5", git = "https://github.com/apache/incubator-teaclave-sgx-sdk", tag = "v1.1.5" }
sgx_rand = { version = "1.1.5", git = "https://github.com/apache/incubator-teaclave-sgx-sdk", tag = "v1.1.5" }
sgx_tcrypto = { version = "1.1.5", git = "https://github.com/apache/incubator-teaclave-sgx-sdk", tag = "v1.1.5" }
sgx_trts = { version = "1.1.5", git = "https://github.com/apache/incubator-teaclave-sgx-sdk", tag = "v1.1.5" }
sgx_tstd = { version = "1.1.5", git = "https://github.com/apache/incubator-teaclave-sgx-sdk", tag = "v1.1.5" }
sgx_types = { version = "1.1.5", git = "https://github.com/apache/incubator-teaclave-sgx-sdk", tag = "v1.1.5" }
sgx_ucrypto = { version = "1.1.5", git = "https://github.com/apache/incubator-teaclave-sgx-sdk", tag = "v1.1.5" }
sgx_urts = { version = "1.1.5", git = "https://github.com/apache/incubator-teaclave-sgx-sdk", tag = "v1.1.5" }
sgx_alloc = { version = "1.1.6", git = "https://github.com/apache/incubator-teaclave-sgx-sdk", branch = "v1.1.6-testing" }
sgx_crypto_helper = { version = "1.1.6", git = "https://github.com/apache/incubator-teaclave-sgx-sdk", branch = "v1.1.6-testing" }
sgx_libc = { version = "1.1.6", git = "https://github.com/apache/incubator-teaclave-sgx-sdk", branch = "v1.1.6-testing" }
sgx_rand = { version = "1.1.6", git = "https://github.com/apache/incubator-teaclave-sgx-sdk", branch = "v1.1.6-testing" }
sgx_tcrypto = { version = "1.1.6", git = "https://github.com/apache/incubator-teaclave-sgx-sdk", branch = "v1.1.6-testing" }
sgx_trts = { version = "1.1.6", git = "https://github.com/apache/incubator-teaclave-sgx-sdk", branch = "v1.1.6-testing" }
sgx_tstd = { version = "1.1.6", git = "https://github.com/apache/incubator-teaclave-sgx-sdk", branch = "v1.1.6-testing" }
sgx_types = { version = "1.1.6", git = "https://github.com/apache/incubator-teaclave-sgx-sdk", branch = "v1.1.6-testing" }
sgx_ucrypto = { version = "1.1.6", git = "https://github.com/apache/incubator-teaclave-sgx-sdk", branch = "v1.1.6-testing" }
sgx_urts = { version = "1.1.6", git = "https://github.com/apache/incubator-teaclave-sgx-sdk", branch = "v1.1.6-testing" }

#[patch."https://github.com/integritee-network/sgx-runtime"]
#sgx-runtime = { path = "../sgx-runtime/runtime"}
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ clean:

.PHONY: pin-sgx
pin-sgx:
@echo "Pin sgx dependencies to d2d339cbb005f676bb700059bd51dc689c025f6b"
@cd enclave-runtime && cargo update -p sgx_tstd --precise d2d339cbb005f676bb700059bd51dc689c025f6b
@cargo update -p sgx_tstd --precise d2d339cbb005f676bb700059bd51dc689c025f6b
@echo "Pin sgx dependencies to 9c1bbd52f188f600a212b57c916124245da1b7fd"
@cd enclave-runtime && cargo update -p sgx_tstd --precise 9c1bbd52f188f600a212b57c916124245da1b7fd
@cargo update -p sgx_tstd --precise 9c1bbd52f188f600a212b57c916124245da1b7fd

mrenclave:
@$(SGX_ENCLAVE_SIGNER) dump -enclave ./bin/enclave.signed.so -dumpfile df.out && ./extract_identity < df.out && rm df.out
Expand Down
3 changes: 3 additions & 0 deletions UpdateRustSGXSDK.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ VERSION_FILE = rust-sgx-sdk/version
LOCAL_VERSION = $(shell cat $(VERSION_FILE))
COMMAND = git ls-remote $(REPO) HEAD | awk '{ print $$1 }'
REMOTE_VERSION = $(shell $(COMMAND))
# or specify the exact hash if you need a non-default branch / tag / commit etc.
#REMOTE_VERSION = 9c1bbd52f188f600a212b57c916124245da1b7fd

# update the SDK files
all: updatesdk
Expand All @@ -22,6 +24,7 @@ ifneq ('$(LOCAL_VERSION)','$(REMOTE_VERSION)')

@rm -rf $(SDK_PATH_GIT)
@$(GIT) clone $(REPO) $(SDK_PATH_GIT)
@$(GIT) -C $(SDK_PATH_GIT) checkout $(REMOTE_VERSION)
rsync -a $(SDK_PATH_GIT)/edl $(SDK_PATH)
rsync -a $(SDK_PATH_GIT)/common $(SDK_PATH)
rm -rf $(SDK_PATH_GIT)
Expand Down
4 changes: 2 additions & 2 deletions app-libs/stf/src/evm_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ pub fn evm_create_address(caller: H160, nonce: Index) -> H160 {
// FIXME: Once events are available, these addresses should be read from events.
pub fn evm_create2_address(caller: H160, salt: H256, code_hash: H256) -> H160 {
let mut hasher = Keccak256::new();
hasher.update(&[0xff]);
hasher.update([0xff]);
hasher.update(&caller[..]);
hasher.update(&salt[..]);
hasher.update(&code_hash[..]);
H256::from_slice(hasher.finalize().as_slice()).into()
}

pub fn create_code_hash(code: &[u8]) -> H256 {
H256::from_slice(Keccak256::digest(&code).as_slice())
H256::from_slice(Keccak256::digest(code).as_slice())
}

pub fn get_evm_account(account: &AccountId) -> H160 {
Expand Down
6 changes: 3 additions & 3 deletions app-libs/stf/src/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use crate::{TrustedGetter, TrustedOperation};
use codec::{Decode, Encode};
use itp_types::H256;
use sp_core::blake2_256;
use std::vec::Vec;
use std::{boxed::Box, vec::Vec};

/// Trusted operation Or hash
///
Expand All @@ -33,12 +33,12 @@ pub enum TrustedOperationOrHash<Hash> {
/// Raw extrinsic bytes.
OperationEncoded(Vec<u8>),
/// Raw extrinsic
Operation(TrustedOperation),
Operation(Box<TrustedOperation>),
}

impl<Hash> TrustedOperationOrHash<Hash> {
pub fn from_top(top: TrustedOperation) -> Self {
TrustedOperationOrHash::Operation(top)
TrustedOperationOrHash::Operation(Box::new(top))
}
}

Expand Down
2 changes: 1 addition & 1 deletion cli/src/base_cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ fn list_workers(cli: &Cli) {
};
let enclave = enclave.unwrap();
let timestamp =
DateTime::<Utc>::from(UNIX_EPOCH + Duration::from_millis(enclave.timestamp as u64));
DateTime::<Utc>::from(UNIX_EPOCH + Duration::from_millis(enclave.timestamp));
println!("Enclave {}", w);
println!(" AccountId: {}", enclave.pubkey.to_ss58check());
println!(" MRENCLAVE: {}", enclave.mr_enclave.to_base58());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,6 @@ where
+ (u32::from(array[3]) << 24)
}

#[allow(const_err)]
fn create_attestation_report(
&self,
pub_k: &[u8; 32],
Expand Down
6 changes: 3 additions & 3 deletions core-primitives/attestation-handler/src/cert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,10 @@ where
let mut iter = payload.split(|x| *x == 0x7C);
let attn_report_raw = iter.next().ok_or(sgx_status_t::SGX_ERROR_UNEXPECTED)?;
let sig_raw = iter.next().ok_or(sgx_status_t::SGX_ERROR_UNEXPECTED)?;
let sig = base64::decode(&sig_raw).map_err(|e| EnclaveError::Other(e.into()))?;
let sig = base64::decode(sig_raw).map_err(|e| EnclaveError::Other(e.into()))?;

let sig_cert_raw = iter.next().ok_or(sgx_status_t::SGX_ERROR_UNEXPECTED)?;
let sig_cert_dec = base64::decode_config(&sig_cert_raw, base64::STANDARD)
let sig_cert_dec = base64::decode_config(sig_cert_raw, base64::STANDARD)
.map_err(|e| EnclaveError::Other(e.into()))?;
let sig_cert = webpki::EndEntityCert::from(&sig_cert_dec).expect("Bad DER");

Expand Down Expand Up @@ -406,7 +406,7 @@ where

// 3. Verify quote body
if let Value::String(quote_raw) = &attn_report["isvEnclaveQuoteBody"] {
let quote = base64::decode(&quote_raw).map_err(|e| EnclaveError::Other(e.into()))?;
let quote = base64::decode(quote_raw).map_err(|e| EnclaveError::Other(e.into()))?;
debug!("Quote = {:?}", quote);
// TODO: lack security check here
let sgx_quote: sgx_quote_t = unsafe { ptr::read(quote.as_ptr() as *const _) };
Expand Down
8 changes: 4 additions & 4 deletions core-primitives/enclave-api/src/enclave_base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ impl EnclaveBase for Enclave {
let mut retval = sgx_status_t::SGX_SUCCESS;

let pubkey_size = SHIELDING_KEY_SIZE;
let mut pubkey = vec![0u8; pubkey_size as usize];
let mut pubkey = vec![0u8; pubkey_size];

let result = unsafe {
ffi::get_rsa_encryption_pubkey(
Expand All @@ -207,7 +207,7 @@ impl EnclaveBase for Enclave {

fn get_ecc_signing_pubkey(&self) -> EnclaveResult<ed25519::Public> {
let mut retval = sgx_status_t::SGX_SUCCESS;
let mut pubkey = [0u8; SIGNING_KEY_SIZE as usize];
let mut pubkey = [0u8; SIGNING_KEY_SIZE];

let result = unsafe {
ffi::get_ecc_signing_pubkey(
Expand All @@ -226,7 +226,7 @@ impl EnclaveBase for Enclave {

fn get_mrenclave(&self) -> EnclaveResult<[u8; MR_ENCLAVE_SIZE]> {
let mut retval = sgx_status_t::SGX_SUCCESS;
let mut mr_enclave = [0u8; MR_ENCLAVE_SIZE as usize];
let mut mr_enclave = [0u8; MR_ENCLAVE_SIZE];

let result = unsafe {
ffi::get_mrenclave(
Expand All @@ -251,7 +251,7 @@ fn init_parentchain_components_ffi(
let mut retval = sgx_status_t::SGX_SUCCESS;

let latest_header_size = HEADER_MAX_SIZE;
let mut latest_header = vec![0u8; latest_header_size as usize];
let mut latest_header = vec![0u8; latest_header_size];

let result = unsafe {
ffi::init_parentchain_components(
Expand Down
2 changes: 1 addition & 1 deletion core-primitives/enclave-api/src/remote_attestation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl RemoteAttestation for Enclave {
let mut retval = sgx_status_t::SGX_SUCCESS;

let unchecked_extrinsic_size = EXTRINSIC_MAX_SIZE;
let mut unchecked_extrinsic: Vec<u8> = vec![0u8; unchecked_extrinsic_size as usize];
let mut unchecked_extrinsic: Vec<u8> = vec![0u8; unchecked_extrinsic_size];

let url = w_url.encode();

Expand Down
2 changes: 1 addition & 1 deletion core-primitives/node-api/metadata/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl NodeMetadata {
let call_index = pallet
.calls
.get(call_name)
.ok_or(Error::NodeMetadata(MetadataError::CallNotFound(call_name)))?;
.ok_or_else(|| Error::NodeMetadata(MetadataError::CallNotFound(call_name)))?;
Ok([pallet.index, *call_index])
}

Expand Down
2 changes: 1 addition & 1 deletion core-primitives/node-api/metadata/src/pallet_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ impl SystemStorageIndexes for NodeMetadata {
}

fn system_account_storage_map_key(&self, index: u64) -> Result<StorageKey> {
self.storage_map_key(SYSTEM, "Account", &index)
self.storage_map_key(SYSTEM, "Account", index)
}
}
2 changes: 1 addition & 1 deletion core-primitives/node-api/metadata/src/pallet_teerex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ impl TeerexStorageKey for NodeMetadata {
}

fn enclave_registry_storage_map_key(&self, index: u64) -> Result<StorageKey> {
self.storage_map_key(TEEREX, "EnclaveRegistry", &index)
self.storage_map_key(TEEREX, "EnclaveRegistry", index)
}
}
4 changes: 2 additions & 2 deletions core-primitives/stf-state-handler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"

[dependencies]
# sgx dependencies
sgx_crypto_helper = { default-features = false, optional = true, features = ["mesalock_sgx"], version = "1.1.5", git = "https://github.com/apache/incubator-teaclave-sgx-sdk", tag = "v1.1.5" }
sgx_crypto_helper = { default-features = false, optional = true, features = ["mesalock_sgx"], version = "1.1.6", git = "https://github.com/apache/incubator-teaclave-sgx-sdk", branch = "v1.1.6-testing" }
sgx_tcrypto = { branch = "master", git = "https://github.com/apache/teaclave-sgx-sdk.git", optional = true }
sgx_tstd = { branch = "master", git = "https://github.com/apache/teaclave-sgx-sdk.git", optional = true }
sgx_types = { branch = "master", git = "https://github.com/apache/teaclave-sgx-sdk.git" }
Expand Down Expand Up @@ -72,5 +72,5 @@ sgx = [
test = [
"itp-sgx-crypto/mocks",
"itp-stf-interface/mocks",
"sgx_crypto_helper",
"sgx_crypto_helper/mesalock_sgx",
]
Loading

0 comments on commit f5674c4

Please sign in to comment.