Intel API Client
This module provides an API client for interacting with the Intel API for Trusted Services.
The API follows the documentation found at Intel API Documentation.
Create an [ApiClient
] to interface with the Intel API.
Example
use intel_dcap_api::{ApiClient, IntelApiError, TcbInfoResponse};
#[tokio::main]
async fn main() -> Result<(), IntelApiError> {
let client = ApiClient::new()?;
let fmspc_example = "00606A000000"; match client.get_sgx_tcb_info(fmspc_example, None, None).await {
Ok(TcbInfoResponse {
tcb_info_json,
issuer_chain,
}) => println!(
"SGX TCB Info for {}:\n{}\nIssuer Chain: {}",
fmspc_example, tcb_info_json, issuer_chain
),
Err(e) => eprintln!("Error getting SGX TCB info: {}", e),
}
Ok(())
}