pub struct CoordConfig { /* private fields */ }Expand description
Coordinator configuration struct
See library documentation for usage example.
Implementations§
Source§impl CoordConfig
impl CoordConfig
Sourcepub fn new_from_file(
cert_path: &Path,
key_path: &Path,
) -> Result<Self, CertReadError>
pub fn new_from_file( cert_path: &Path, key_path: &Path, ) -> Result<Self, CertReadError>
Construct a new coordinator configuration from files.
This is a conveniece wrapper around CoordConfig::new. Both PEM and DER formats are supported.
Sourcepub fn new(cert: CertificateChain, key: PrivateKey) -> Self
pub fn new(cert: CertificateChain, key: PrivateKey) -> Self
Construct a new coordinator configuration using the given CertificateChainand PrivateKey.
Sourcepub fn set_ip(&mut self, ip: IpAddr) -> &mut Self
pub fn set_ip(&mut self, ip: IpAddr) -> &mut Self
Set listen address to ip
By default, the listen address is set to 0.0.0.0:0. To bind to a host-assigned
IPv6 port instead, one might call
coord_cfg.set_ip(IpAddr::V6(Ipv6Addr::UNSPECIFIED));Sourcepub fn enable_keylog(&mut self) -> &mut Self
pub fn enable_keylog(&mut self) -> &mut Self
Enable logging key material to the file specified by the environment variable SSLKEYLOGFILE.
Sourcepub fn enable_stateless_retry(&mut self) -> &mut Self
pub fn enable_stateless_retry(&mut self) -> &mut Self
Enable QUIC stateless retry.
Per QUIC spec, stateless retry defends against client address spoofing. The downside is that this adds another round-trip to new connections.
Sourcepub fn set_client_ca(&mut self, ca: Certificate) -> &mut Self
pub fn set_client_ca(&mut self, ca: Certificate) -> &mut Self
Add a trusted certificate authority for checking Client certificates
If no trusted CA is provided, self-signed Client certificates are required.
Sourcepub fn set_client_ca_from_file(
&mut self,
cert_path: &Path,
) -> Result<&mut Self, CertReadError>
pub fn set_client_ca_from_file( &mut self, cert_path: &Path, ) -> Result<&mut Self, CertReadError>
Add a trusted certificate authority for checking Client certs from a file
This is a convenience wrapper around CoordConfig::set_client_ca. Both PEM and DER formats are supported.
Trait Implementations§
Source§impl Clone for CoordConfig
impl Clone for CoordConfig
Source§fn clone(&self) -> CoordConfig
fn clone(&self) -> CoordConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more