Article ID: 000090369 Content Type: Product Information & Documentation Last Reviewed: 04/07/2022

How Do I Use Operating System Capabilities, Such as Reading and Writing a File, from within an Enclave?

BUILT IN - ARTICLE INTRO SECOND COMPONENT
Summary

Use outside calls (ocalls) from within an enclave to access untrusted functions.

Description

Unable to make system calls or I/O operations, such as manipulating files, from within an enclave.

Resolution

In the Intel® Software Guard Extensions (Intel® SGX) security model, the operating system is considered untrusted. Therefore, enclaves cannot use operating system capabilities directly.

To access resources provided in the untrusted domain, such as unprotected files, the enclave must make an ocall into the untrusted application that loaded the enclave.

Additional information

Refer to section, Calling Functions outside the Enclave, in the Intel® SGX Developer Reference Guide for your OS .

Enclaves can read and write protected files directly using the Intel® Protected File System.