Expand description
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()?;
// Example: Get SGX TCB Info
let fmspc_example = "00606A000000"; // Example FMSPC from docs
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(())
}
Structs§
- AddPackage
Response - Response structure for the request to add a package.
- ApiClient
- Client for interacting with Intel Trusted Services API.
- Enclave
Identity Response - Response structure for Enclave Identity Information.
- PckCertificate
Response - Response structure for a PCK (Platform Configuration Key) Certificate.
- PckCertificates
Response - Response structure for multiple PCK (Platform Configuration Key) Certificates.
- PckCrl
Response - Response structure for Platform Configuration Key Certificate Revocation List (PCK CRL).
- TcbEvaluation
Data Numbers Response - Response structure for TCB Evaluation Data Numbers (V4 ONLY).
- TcbInfo
Response - Response structure for TCB (Trusted Computing Base) Information.
Enums§
- ApiVersion
- Represents the version of the Intel Trusted Services API to target.
- CaType
- Represents the type of Certificate Authority (CA) for Intel Trusted Services.
- CrlEncoding
- Represents the encoding format for Certificate Revocation Lists (CRLs).
- Intel
ApiError - Represents all possible errors that can occur when interacting with Intel’s DCAP API.
- Platform
Filter - Represents the platform filter options for Intel DCAP (Data Center Attestation Primitives) API.
- Update
Type - Represents the type of update for Intel Trusted Services.
Type Aliases§
- Enclave
Identity Json - JSON structure as defined in Appendix B of the API spec. Content may vary slightly between API v3 and v4.
- Fmspc
Json Response - JSON Array of {fmspc, platform}. Content structure expected to be consistent between v3 and v4.
- TcbEvaluation
Data Numbers Json - JSON structure as defined in Appendix C of the API spec (V4 ONLY).
- TcbInfo
Json - JSON structure as defined in Appendix A of the API spec. Content may vary slightly between API v3 and v4.