use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub enum TlsStatus {
    NotUsed,
    HandshakeSucceeded,
    HandshakeFailed,
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct CertificateInfo {
    pub subject: String,
    pub issuer: String,
    pub not_before: Option<String>,
    pub not_after: Option<String>,
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct TlsReport {
    pub enabled: bool,
    pub status: TlsStatus,
    pub version: Option<String>,
    pub cipher_suite: Option<String>,
    pub certificate: Option<CertificateInfo>,
    pub error_message: Option<String>,
}
