use chrono::{DateTime, Utc};
pub(crate) mod print;
pub(crate) mod subpacket;
pub(crate) mod transform;
#[derive(Debug)]
pub(crate) struct CertInfo {
pub(crate) primary: KeyInfo,
pub(crate) subkeys: Vec<KeyInfo>,
pub(crate) users: Vec<UserInfo>,
pub(crate) user_attributes: Vec<UserAttributeInfo>,
}
#[derive(Debug)]
pub(crate) struct KeyInfo {
pub(crate) fingerprint: String,
pub(crate) created: DateTime<Utc>,
pub(crate) algorithm: String,
pub(crate) version: u8,
pub(crate) revocations: Vec<SigInfo>,
pub(crate) signatures: Vec<SigInfo>,
}
#[derive(Debug)]
pub(crate) struct UserInfo {
pub(crate) id: String,
pub(crate) signatures: Vec<SigInfo>,
}
#[derive(Debug)]
pub(crate) struct UserAttributeInfo {
pub(crate) id: String, pub(crate) signatures: Vec<SigInfo>,
}
#[derive(Debug, Clone)]
pub(crate) struct SigInfo {
pub(crate) typ: pgp::packet::SignatureType,
pub(crate) hash_algo: String,
pub(crate) public_key_algo: String,
pub(crate) version: u8,
pub(crate) created: DateTime<Utc>,
pub(crate) legacy_issuer: Option<String>, pub(crate) hashed: Vec<SubpacketInfo>,
pub(crate) unhashed: Vec<SubpacketInfo>,
}
#[derive(Debug, Clone)]
pub(crate) struct SubpacketInfo {
pub(crate) typ: pgp::packet::SubpacketType,
pub(crate) value: String,
pub(crate) critical: bool,
}