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,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)