Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/cert/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ pub mod parser;
pub mod tls;

use serde::Serialize;
use std::collections::HashMap;
use std::fmt;
use std::time::{SystemTime, UNIX_EPOCH};

Expand Down Expand Up @@ -46,6 +47,20 @@ impl CertInfo {
}
}

pub struct VerboseCert {
pub base_cert: CertInfo,
pub extensions: HashMap<String, Vec<(String, String)>>,
}

// This could be implemented using a trait, however this would require some refactoring
impl VerboseCert {
// Days remaining and key description removed to keep clippy clean

pub fn is_expired(&self) -> bool {
self.base_cert.is_expired()
}
}

/// Key algorithm type
#[derive(Debug, Clone, Serialize)]
pub enum KeyType {
Expand Down
Loading