Intel® SGX SDK functions that report the status of SGX on a platform
- Implementing an application that will run on systems with Intel® SGX and without Intel® SGX.
- The application decides which code path to take depending on the availability of Intel® SGX on the platform.
The Intel® SGX SDK provides the following functions that applications can use to determine the status of Intel® SGX on a platform.
- sgx_is_capable()
- sgx_cap_enable_device()
- sgx_cap_get_status()
- sgx_enable_device()
If Intel® SGX is fully enabled, the application can make enclave calls.
Navigate to Section Intel® Software Guard Extensions SDK Feature-Detection Functions in Properly Detecting Intel® Software Guard Extensions (Intel® SGX) in Your Applications for a full explanation of these functions. Scroll down further for code samples.
Intel® Software Guard Extensions SDK for Linux*