Skip to main content

boatramp_types/
cert.rs

1//! Certificate **wire structs** shared across boatramp.
2//!
3//! Only the key-free [`CertStatus`] view (for the `cert status` endpoint) is a
4//! pure serde wire type and lives here so the server, CLI, and web console
5//! share one definition (wasm-clean). The cluster cert *store* — `StoredCert`,
6//! `CertStore`/`KvCertStore`, and `ensure_cert` — depends on the KV backend and
7//! stays in `boatramp-core::cert`.
8
9use serde::{Deserialize, Serialize};
10
11/// A safe, key-free view of a stored cert (for the `cert status` endpoint):
12/// which domain and when it expires, never the chain or private key.
13#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
14pub struct CertStatus {
15    /// The domain the cert covers.
16    pub domain: String,
17    /// `notAfter` as a Unix timestamp (seconds).
18    pub not_after_unix: u64,
19}