pub(crate) struct HandshakeHashBuffer {
buffer: Vec<u8>,
client_auth_enabled: bool,
}
Expand description
Early stage buffering of handshake payloads.
Before we know the hash algorithm to use to verify the handshake, we just buffer the messages.
During the handshake, we may restart the transcript due to a HelloRetryRequest, reverting
from the HandshakeHash
to a HandshakeHashBuffer
again.
Fields§
§buffer: Vec<u8>
§client_auth_enabled: bool
Implementations§
Source§impl HandshakeHashBuffer
impl HandshakeHashBuffer
pub(crate) fn new() -> Self
Sourcepub(crate) fn set_client_auth_enabled(&mut self)
pub(crate) fn set_client_auth_enabled(&mut self)
We might be doing client auth, so need to keep a full log of the handshake.
Sourcepub(crate) fn add_message(&mut self, m: &Message<'_>)
pub(crate) fn add_message(&mut self, m: &Message<'_>)
Hash/buffer a handshake message.
Sourcepub(crate) fn hash_given(
&self,
provider: &'static dyn Hash,
extra: &[u8],
) -> Output
pub(crate) fn hash_given( &self, provider: &'static dyn Hash, extra: &[u8], ) -> Output
Get the hash value if we were to hash extra
too.
Sourcepub(crate) fn start_hash(self, provider: &'static dyn Hash) -> HandshakeHash
pub(crate) fn start_hash(self, provider: &'static dyn Hash) -> HandshakeHash
We now know what hash function the verify_data will use.
Trait Implementations§
Source§impl Clone for HandshakeHashBuffer
impl Clone for HandshakeHashBuffer
Source§fn clone(&self) -> HandshakeHashBuffer
fn clone(&self) -> HandshakeHashBuffer
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for HandshakeHashBuffer
impl RefUnwindSafe for HandshakeHashBuffer
impl Send for HandshakeHashBuffer
impl Sync for HandshakeHashBuffer
impl Unpin for HandshakeHashBuffer
impl UnwindSafe for HandshakeHashBuffer
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
Mutably borrows from an owned value. Read more