pub struct ServerTlsSource {
pub cert_path: PathBuf,
pub key_path: PathBuf,
pub client_ca_path: Option<PathBuf>,
}Expand description
File-based TLS source for rustls server-side configuration.
Reads PEM-encoded cert+key from the filesystem. When client_ca_path is
set, the server requires (and verifies) a client certificate (mTLS).
Fields§
§cert_path: PathBufPath to the PEM-encoded server certificate chain.
key_path: PathBufPath to the PEM-encoded private key for the server certificate.
client_ca_path: Option<PathBuf>Optional path to a PEM-encoded CA certificate for client verification. When set, mTLS is enabled (clients must present a cert signed by this CA).
Implementations§
Source§impl ServerTlsSource
impl ServerTlsSource
Sourcepub fn build_server_config(&self) -> Result<ServerConfig, CamelError>
pub fn build_server_config(&self) -> Result<ServerConfig, CamelError>
Build a rustls::ServerConfig from the PEM files.
Returns EndpointCreationFailed on any I/O, PEM parse, or rustls
configuration error.
ALPN protocols are intentionally NOT set — callers add their own
(e.g., b"h2" for gRPC) after construction.
Trait Implementations§
Source§impl Clone for ServerTlsSource
impl Clone for ServerTlsSource
Source§fn clone(&self) -> ServerTlsSource
fn clone(&self) -> ServerTlsSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ServerTlsSource
impl RefUnwindSafe for ServerTlsSource
impl Send for ServerTlsSource
impl Sync for ServerTlsSource
impl Unpin for ServerTlsSource
impl UnsafeUnpin for ServerTlsSource
impl UnwindSafe for ServerTlsSource
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
Mutably borrows from an owned value. Read more