#[derive(Debug, thiserror::Error)]
pub enum TeeError {
#[error("tee config error: {0}")]
Config(String),
#[error("attestation verification failed: {0}")]
AttestationVerification(String),
#[error("attestation report expired: issued_at={issued_at}, max_age_secs={max_age_secs}")]
AttestationExpired { issued_at: u64, max_age_secs: u64 },
#[error("unsupported tee provider: {0}")]
UnsupportedProvider(String),
#[error("tee deployment failed: {0}")]
DeploymentFailed(String),
#[error("tee runtime not available: {0}")]
RuntimeUnavailable(String),
#[error("key exchange failed: {0}")]
KeyExchange(String),
#[error("sealed secret error: {0}")]
SealedSecret(String),
#[error("measurement mismatch: expected {expected}, got {actual}")]
MeasurementMismatch { expected: String, actual: String },
#[error("public key binding error: {0}")]
PublicKeyBinding(String),
#[error("backend error: {0}")]
Backend(String),
#[error(transparent)]
Io(#[from] std::io::Error),
#[error("serialization error: {0}")]
Serialization(String),
}