pub struct CaState {
pub id: String,
pub key_type: String,
pub cert_der: Vec<u8>,
pub cert_chain: Vec<Vec<u8>>,
pub hash_algorithm: String,
pub validity_days: u32,
pub crl_url: Option<String>,
pub ocsp_url: Option<String>,
pub crl_cache: Mutex<Option<(Vec<u8>, Instant)>>,
pub cab_forum_compliant: bool,
}Expand description
Per-CA key material and issuance policy.
One CaState is created for each [[ca]] config entry at startup.
The signing key and certificate chain are loaded once and shared
across all concurrent handler tasks via Arc<CaState>.
Fields§
§id: StringUnique identifier (matches CaConfig.id).
key_type: StringKey type string from config, e.g., "ec:P-256" or "rsa:2048".
cert_der: Vec<u8>DER-encoded CA certificate.
cert_chain: Vec<Vec<u8>>Full certificate chain (CA cert + intermediates) as DER blobs.
Used for the /cacerts EST endpoint (RFC 7030 §4.1).
hash_algorithm: StringHash algorithm string, e.g., "sha256".
validity_days: u32Default validity period for issued certificates.
crl_url: Option<String>Optional CRL distribution point URL.
ocsp_url: Option<String>Optional OCSP responder URL.
crl_cache: Mutex<Option<(Vec<u8>, Instant)>>In-memory CRL cache: DER bytes + expiry instant.
Populated lazily on the first CRL request; invalidated after revocation events.
cab_forum_compliant: boolCA/B Forum compliance enforcement.
Auto Trait Implementations§
impl !Freeze for CaState
impl !RefUnwindSafe for CaState
impl Send for CaState
impl Sync for CaState
impl Unpin for CaState
impl UnsafeUnpin for CaState
impl UnwindSafe for CaState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more