pub(crate) struct ClientHelloPayload {
pub(crate) client_version: ProtocolVersion,
pub(crate) random: Random,
pub(crate) session_id: SessionId,
pub(crate) cipher_suites: Vec<CipherSuite>,
pub(crate) compression_methods: Vec<Compression>,
pub(crate) extensions: Box<ClientExtensions<'static>>,
}Fields§
§client_version: ProtocolVersion§random: Random§session_id: SessionId§cipher_suites: Vec<CipherSuite>§compression_methods: Vec<Compression>§extensions: Box<ClientExtensions<'static>>Implementations§
Source§impl ClientHelloPayload
impl ClientHelloPayload
pub(crate) fn ech_inner_encoding( &self, to_compress: Vec<ExtensionType>, ) -> Vec<u8> ⓘ
pub(crate) fn payload_encode(&self, bytes: &mut Vec<u8>, purpose: Encoding)
pub(crate) fn has_certificate_compression_extension_with_duplicates( &self, ) -> bool
Methods from Deref<Target = ClientExtensions<'static>>§
const ALL_EXTENSIONS: &'static [ExtensionType]
Sourcefn read_one(
&mut self,
r: &mut Reader<'a>,
unknown: impl FnMut(ExtensionType) -> Result<(), InvalidMessage>,
) -> Result<ExtensionType, InvalidMessage>
fn read_one( &mut self, r: &mut Reader<'a>, unknown: impl FnMut(ExtensionType) -> Result<(), InvalidMessage>, ) -> Result<ExtensionType, InvalidMessage>
Reads one extension typ, length and body from r.
Unhandled extensions (according to read_extension_body() are inserted into unknown_extensions)
Sourcefn read_extension_body(
&mut self,
typ: ExtensionType,
r: &mut Reader<'a>,
) -> Result<bool, InvalidMessage>
fn read_extension_body( &mut self, typ: ExtensionType, r: &mut Reader<'a>, ) -> Result<bool, InvalidMessage>
Reads one extension body for an extension named by typ.
Returns true if handled, false otherwise.
r is fully consumed if typ is unhandled.
Sourcefn encode_one(&self, typ: ExtensionType, output: &mut Vec<u8>)
fn encode_one(&self, typ: ExtensionType, output: &mut Vec<u8>)
Encode one extension body for typ into output.
Adds nothing to output if typ is absent from this
struct, either because it is None or unhandled by
this struct.
Sourcepub(crate) fn collect_used(&self) -> Vec<ExtensionType>
pub(crate) fn collect_used(&self) -> Vec<ExtensionType>
Return a list of extensions whose items are Some
Sourcepub(crate) fn clone_one(&mut self, source: &Self, typ: ExtensionType)
pub(crate) fn clone_one(&mut self, source: &Self, typ: ExtensionType)
Clone the value of the extension identified by typ from source to self.
Does nothing if typ is not an extension handled by this object.
Sourcepub(crate) fn clear(&mut self, typ: ExtensionType)
pub(crate) fn clear(&mut self, typ: ExtensionType)
Remove the extension identified by typ from self.
Sourcepub(crate) fn only_contains(&self, allowed: &[ExtensionType]) -> bool
pub(crate) fn only_contains(&self, allowed: &[ExtensionType]) -> bool
Return true if all present extensions are named in allowed
Sourcepub(crate) fn contains_any(&self, exts: &[ExtensionType]) -> bool
pub(crate) fn contains_any(&self, exts: &[ExtensionType]) -> bool
Return true if any extension named in exts is present.
fn contains(&self, e: ExtensionType) -> bool
pub(crate) fn used_extensions_in_encoding_order(&self) -> Vec<ExtensionType>
Sourcefn order_insensitive_extensions_in_random_order(&self) -> Vec<ExtensionType>
fn order_insensitive_extensions_in_random_order(&self) -> Vec<ExtensionType>
Returns extensions which don’t need a specific order, in randomized order.
Extensions are encoded in three portions:
-
First, extensions not otherwise dealt with by other cases. These are encoded in random order, controlled by
self.order_seed, and this is the set of extensions returned by this function. -
Second, extensions named in
self.contiguous_extensions, in the order given by that field. -
Lastly, any ECH and PSK extensions (in that order). These are required to be last by the standard.
Trait Implementations§
Source§impl Clone for ClientHelloPayload
impl Clone for ClientHelloPayload
Source§fn clone(&self) -> ClientHelloPayload
fn clone(&self) -> ClientHelloPayload
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more