Article ID: 000089513 Content Type: Product Information & Documentation Last Reviewed: 02/08/2022

How Can an Enclave and an Untrusted Application Call the Same Function?

BUILT IN - ARTICLE INTRO SECOND COMPONENT
Summary

Implement the function in a static library, without dependencies, and link the static library to the enclave and the untrusted application.

Description

Unable to determine how to build an application with a function that can be called from an enclave or from an untrusted application without duplicating the function code.

Resolution
  1. Implement the function in a static library without dependencies
  2. Link the static library to the enclave and to the untrusted application
  3. Call the function from the enclave or the untrusted application depending on the Intel® Software Guard Extensions (Intel® SGX) capabilities of the platform
Additional information

Read more about linking with libraries in the section Linking Enclave with Libraries in the SGX Developer Reference for your OS:

Related Products

This article applies to 1 products