pub 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 fn new() -> Self
sourcepub fn set_client_auth_enabled(&mut self)
pub fn set_client_auth_enabled(&mut self)
We might be doing client auth, so need to keep a full log of the handshake.
sourcepub fn add_message(&mut self, m: &Message)
pub fn add_message(&mut self, m: &Message)
Hash/buffer a handshake message.
sourcepub fn get_hash_given(&self, hash: &'static Algorithm, extra: &[u8]) -> Digest
pub fn get_hash_given(&self, hash: &'static Algorithm, extra: &[u8]) -> Digest
Get the hash value if we were to hash extra
too.
sourcepub fn start_hash(self, alg: &'static Algorithm) -> HandshakeHash
pub fn start_hash(self, alg: &'static Algorithm) -> 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 moresource§impl Default for HandshakeHashBuffer
impl Default for HandshakeHashBuffer
source§fn default() -> HandshakeHashBuffer
fn default() -> HandshakeHashBuffer
Returns the “default value” for a type. Read more
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
§impl<T> CloneAny for T
impl<T> CloneAny for T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Tail, T> Prepend<T> for Tail
impl<Tail, T> Prepend<T> for Tail
§type PreprendResult = Tail
type PreprendResult = Tail
The Resulting [
TupleList
], of an [Prepend::prepend()
] call,
including the prepended entry.