CertificateInfo: make fields public

This is used in a public API, so fields needs to be public.
This commit is contained in:
Dietmar Maurer 2024-01-16 10:56:09 +01:00
parent c073c883c4
commit 06009635f6

View File

@ -65,39 +65,39 @@ const ACME_SUBDIRS: SubdirMap = &[(
pub struct CertificateInfo {
/// Certificate file name.
#[serde(skip_serializing_if = "Option::is_none")]
filename: Option<String>,
pub filename: Option<String>,
/// Certificate subject name.
subject: String,
pub subject: String,
/// List of certificate's SubjectAlternativeName entries.
san: Vec<String>,
pub san: Vec<String>,
/// Certificate issuer name.
issuer: String,
pub issuer: String,
/// Certificate's notBefore timestamp (UNIX epoch).
#[serde(skip_serializing_if = "Option::is_none")]
notbefore: Option<i64>,
pub notbefore: Option<i64>,
/// Certificate's notAfter timestamp (UNIX epoch).
#[serde(skip_serializing_if = "Option::is_none")]
notafter: Option<i64>,
pub notafter: Option<i64>,
/// Certificate in PEM format.
#[serde(skip_serializing_if = "Option::is_none")]
pem: Option<String>,
pub pem: Option<String>,
/// Certificate's public key algorithm.
public_key_type: String,
pub public_key_type: String,
/// Certificate's public key size if available.
#[serde(skip_serializing_if = "Option::is_none")]
public_key_bits: Option<u32>,
pub public_key_bits: Option<u32>,
/// The SSL Fingerprint.
#[serde(skip_serializing_if = "Option::is_none")]
fingerprint: Option<String>,
pub fingerprint: Option<String>,
}
impl TryFrom<&cert::CertInfo> for CertificateInfo {