pub struct EchConfig { /* private fields */ }
Expand description
Configuration for performing encrypted client hello.
Note: differs from the protocol-encoded EchConfig (EchConfigMsg
).
Implementations§
Source§impl EchConfig
impl EchConfig
Sourcepub fn new(
ech_config_list: EchConfigListBytes<'_>,
hpke_suites: &[&'static dyn Hpke],
) -> Result<Self, Error>
pub fn new( ech_config_list: EchConfigListBytes<'_>, hpke_suites: &[&'static dyn Hpke], ) -> Result<Self, Error>
Construct an EchConfig by selecting a ECH config from the provided bytes that is compatible with one of the given HPKE suites.
The config list bytes should be sourced from a DNS-over-HTTPS lookup resolving the HTTPS
resource record for the host name of the server you wish to connect via ECH,
and extracting the ECH configuration from the ech
parameter. The extracted bytes should
be base64 decoded to yield the EchConfigListBytes
you provide to rustls.
One of the provided ECH configurations must be compatible with the HPKE provider’s supported suites or an error will be returned.
See the ech-client.rs example for a complete example of fetching ECH configs from DNS.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EchConfig
impl !RefUnwindSafe for EchConfig
impl Send for EchConfig
impl Sync for EchConfig
impl Unpin for EchConfig
impl !UnwindSafe for EchConfig
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,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 128 bytes