Struct s2n_quic::provider::tls::default::client_hello::ClientHello
source · pub struct ClientHello(/* private fields */);
Expand description
use s2n_tls::client_hello::{ClientHello, FingerprintType};
use s2n_tls::connection::Connection;
use s2n_tls::enums::Mode;
let mut conn = Connection::new(Mode::Server);
// handshake happens
let mut client_hello: &ClientHello = conn.client_hello().unwrap();
let mut hash = Vec::new();
let string_size = client_hello.fingerprint_hash(FingerprintType::JA3, &mut hash).unwrap();
// hash has been resized so that it can store the fingerprint hash
let mut string = String::with_capacity(string_size as usize);
// string will not be resized, and the method will fail with
// ErrorType::UsageError if the string doesn't have enough capacity
client_hello.fingerprint_string(FingerprintType::JA3, &mut string).unwrap();
Implementations§
source§impl ClientHello
impl ClientHello
pub fn parse_client_hello(hello: &[u8]) -> Result<Box<ClientHello>, Error>
pub fn session_id(&self) -> Result<Vec<u8>, Error>
pub fn server_name(&self) -> Result<Vec<u8>, Error>
pub fn raw_message(&self) -> Result<Vec<u8>, Error>
Trait Implementations§
source§impl Debug for ClientHello
impl Debug for ClientHello
Auto Trait Implementations§
impl Freeze for ClientHello
impl RefUnwindSafe for ClientHello
impl Send for ClientHello
impl Sync for ClientHello
impl Unpin for ClientHello
impl UnwindSafe for ClientHello
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