Struct rustls::hash_hs::HandshakeHashBuffer
source · 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 get_hash_given(
&self,
hash: &'static Algorithm,
extra: &[u8],
) -> Digest
pub(crate) fn get_hash_given( &self, hash: &'static Algorithm, extra: &[u8], ) -> Digest
Get the hash value if we were to hash extra
too.
sourcepub(crate) fn start_hash(self, alg: &'static Algorithm) -> HandshakeHash
pub(crate) fn start_hash(self, alg: &'static Algorithm) -> HandshakeHash
We now know what hash function the verify_data will use.
Auto 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