pub struct OcspStaplingConfig {
pub enabled: bool,
pub responder_url: Option<String>,
pub refresh_interval_secs: u64,
pub soft_fail: bool,
}Expand description
OCSP stapling configuration for the TLS listener.
RFC 6066 Section 8: the status_request TLS extension allows the
server to provide a stapled OCSP response during the TLS handshake,
eliminating the client’s need to contact the OCSP responder directly.
RFC 7633 Section 4: when the server certificate contains the TLS Feature Extension (must-staple), the server MUST provide a stapled response; failure to do so causes compliant clients to abort.
Fields§
§enabled: boolEnable OCSP stapling.
When true, the server fetches an OCSP response for its own
certificate at startup and refreshes it periodically.
Default: false.
responder_url: Option<String>Override the OCSP responder URL.
When None, the responder URL is extracted from the server
certificate’s Authority Information Access (AIA) extension
(OID 1.3.6.1.5.5.7.48.1).
Set this when the AIA URL is not reachable from the server (e.g., behind a firewall) and a local OCSP responder proxy is available.
refresh_interval_secs: u64Interval in seconds between OCSP response refreshes.
The server fetches a fresh OCSP response from the responder at this interval, replacing the cached stapled response.
Default: 14400 (4 hours). OCSP responses typically have a
nextUpdate validity of 24-48 hours, so refreshing every 4
hours provides adequate margin.
soft_fail: boolAllow serving TLS without a stapled OCSP response when the OCSP responder is unreachable.
When true (soft-fail mode), the server continues to accept
TLS connections without a stapled response if the OCSP
responder cannot be reached. A stale cached response is
served if still within its nextUpdate window. A warning
is logged on each failed refresh attempt.
When false (hard-fail mode), the server refuses to start
if the initial OCSP fetch fails, and transitions to
unhealthy status if subsequent refreshes fail with no valid
cached response.
Default: true.
Trait Implementations§
Source§impl Clone for OcspStaplingConfig
impl Clone for OcspStaplingConfig
Source§fn clone(&self) -> OcspStaplingConfig
fn clone(&self) -> OcspStaplingConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OcspStaplingConfig
impl Debug for OcspStaplingConfig
Source§impl Default for OcspStaplingConfig
impl Default for OcspStaplingConfig
Source§impl<'de> Deserialize<'de> for OcspStaplingConfig
impl<'de> Deserialize<'de> for OcspStaplingConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for OcspStaplingConfig
impl RefUnwindSafe for OcspStaplingConfig
impl Send for OcspStaplingConfig
impl Sync for OcspStaplingConfig
impl Unpin for OcspStaplingConfig
impl UnsafeUnpin for OcspStaplingConfig
impl UnwindSafe for OcspStaplingConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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