Skip to content

Commit

Permalink
Makefile build flag is not passed inside enclave-runtime (#3138)
Browse files Browse the repository at this point in the history
* build flag is not passed inside enclave-runtime; add some log info

* typo
  • Loading branch information
BillyWooo committed Oct 21, 2024
1 parent 5608b36 commit 676e3f2
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tee-worker/bitacross/service/src/enclave/tls_ra.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub fn enclave_run_state_provisioning_server<E: TlsRemoteAttestation>(
loop {
match listener.accept() {
Ok((socket, addr)) => {
info!("[MU-RA-Server] a worker at {} is requesting key provisiong", addr);
info!("[MU-RA-Server] a worker at {} is requesting key provisioning", addr);
// there is some race condition, lets wait until local state gets updated (signers are registered and updated locally through indirect calls)
std::thread::sleep(Duration::from_secs(3));
let result = enclave_api.run_state_provisioning_server(
Expand Down
2 changes: 1 addition & 1 deletion tee-worker/identity/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ endif
enclave:
@echo
@echo "Building the enclave"
$(MAKE) -C ./enclave-runtime/
$(MAKE) -C ./enclave-runtime/ RA_METHOD=$(RA_METHOD) WORKER_DEV=$(WORKER_DEV)

.git/hooks/pre-commit: .githooks/pre-commit
@echo "Installing git hooks"
Expand Down
4 changes: 4 additions & 0 deletions tee-worker/identity/enclave-runtime/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ ifeq ($(WORKER_DEV), 1)
ADDITIONAL_FEATURES := $(ADDITIONAL_FEATURES),development
endif

ifeq ($(RA_METHOD), dcap)
ADDITIONAL_FEATURES := $(ADDITIONAL_FEATURES),dcap
endif

ifeq ($(WORKER_ENV_DATA_PROVIDERS_CONFIG), 1)
ADDITIONAL_FEATURES := $(ADDITIONAL_FEATURES),env-data-providers-config
endif
Expand Down
5 changes: 5 additions & 0 deletions tee-worker/identity/enclave-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ pub unsafe extern "C" fn init(
}
);

#[cfg(feature = "dcap")]
info!(" DCAP is enabled within enclave");
#[cfg(not(feature = "dcap"))]
info!(" DCAP is disabled within enclave");

let mu_ra_url =
match String::decode(&mut slice::from_raw_parts(mu_ra_addr, mu_ra_addr_size as usize))
.map_err(Error::Codec)
Expand Down
2 changes: 1 addition & 1 deletion tee-worker/identity/service/src/enclave/tls_ra.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub fn enclave_run_state_provisioning_server<E: TlsRemoteAttestation>(
loop {
match listener.accept() {
Ok((socket, addr)) => {
info!("[MU-RA-Server] a worker at {} is requesting key provisiong", addr);
info!("[MU-RA-Server] a worker at {} is requesting key provisioning", addr);

let result = enclave_api.run_state_provisioning_server(
socket.as_raw_fd(),
Expand Down

0 comments on commit 676e3f2

Please sign in to comment.