Struct EchConfig
pub struct EchConfig { /* private fields */ }tls only.Expand description
Configuration for performing encrypted client hello.
Note: differs from the protocol-encoded EchConfig (EchConfigMsg).
Implementations§
§impl EchConfig
impl EchConfig
pub fn new(
ech_config_list: EchConfigListBytes<'_>,
hpke_suites: &[&'static dyn Hpke],
) -> Result<EchConfig, Error>
pub fn new( ech_config_list: EchConfigListBytes<'_>, hpke_suites: &[&'static dyn Hpke], ) -> Result<EchConfig, 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,
§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