pub struct TlsConfig {
pub identity: TlsIdentity,
pub trusted_certs: TrustedCerts,
pub server_name: String,
}Expand description
TLS configuration for Noxu DB replication channels.
A TlsConfig bundles this node’s identity (certificate + key) with the
policy for verifying remote peers. Pass it to:
TlsTcpChannelListener::bind_with_tls— encrypted TCP serverTlsTcpChannel::connect_with_tls— encrypted TCP clientTlsConfig::to_quinn_server_config— QUIC server with real certsTlsConfig::to_quinn_client_config— QUIC client with real certs
Fields§
§identity: TlsIdentityThis node’s certificate and private key.
trusted_certs: TrustedCertsHow to verify the remote peer’s certificate.
server_name: StringTLS SNI server name used by the client during the handshake.
Must match the certificate’s Common Name or a Subject Alternative Name. Use "localhost" when connecting to a SelfSigned cert with
subject_alt_names = ["localhost"].
Implementations§
Source§impl TlsConfig
impl TlsConfig
Sourcepub fn insecure(server_name: impl Into<String>) -> Self
pub fn insecure(server_name: impl Into<String>) -> Self
Create an insecure TLS configuration for trusted private networks.
Generates a self-signed certificate at first use and skips peer certificate verification entirely. Equivalent to the current default QUIC channel behaviour.
Requires the tls-rustls feature.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TlsConfig
impl RefUnwindSafe for TlsConfig
impl Send for TlsConfig
impl Sync for TlsConfig
impl Unpin for TlsConfig
impl UnsafeUnpin for TlsConfig
impl UnwindSafe for TlsConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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