pub struct TlsClientHelloContents<'a> {
pub version: TlsVersion,
pub random: &'a [u8],
pub session_id: Option<&'a [u8]>,
pub ciphers: Vec<TlsCipherSuiteID>,
pub comp: Vec<TlsCompressionID>,
pub ext: Option<&'a [u8]>,
}
Expand description
TLS Client Hello (from TLS 1.0 to TLS 1.2)
Some fields are unparsed (for performance reasons), for ex to parse ext
,
call the parse_tls_client_hello_extension function.
Fields§
§version: TlsVersion
TLS version of message
random: &'a [u8]
§session_id: Option<&'a [u8]>
§ciphers: Vec<TlsCipherSuiteID>
A list of ciphers supported by client
comp: Vec<TlsCompressionID>
A list of compression methods supported by client
ext: Option<&'a [u8]>
Implementations§
Source§impl<'a> TlsClientHelloContents<'a>
impl<'a> TlsClientHelloContents<'a>
pub fn new( v: u16, random: &'a [u8], sid: Option<&'a [u8]>, c: Vec<TlsCipherSuiteID>, co: Vec<TlsCompressionID>, e: Option<&'a [u8]>, ) -> Self
pub fn get_version(&self) -> TlsVersion
pub fn get_ciphers(&self) -> Vec<Option<&'static TlsCipherSuite>>
Trait Implementations§
Source§impl<'a> ClientHello<'a> for TlsClientHelloContents<'a>
impl<'a> ClientHello<'a> for TlsClientHelloContents<'a>
Source§fn version(&self) -> TlsVersion
fn version(&self) -> TlsVersion
TLS version of message
fn random(&self) -> &'a [u8] ⓘ
fn session_id(&self) -> Option<&'a [u8]>
Source§fn ciphers(&self) -> &Vec<TlsCipherSuiteID>
fn ciphers(&self) -> &Vec<TlsCipherSuiteID>
A list of ciphers supported by client
Source§fn comp(&self) -> &Vec<TlsCompressionID>
fn comp(&self) -> &Vec<TlsCompressionID>
A list of compression methods supported by client
fn ext(&self) -> Option<&'a [u8]>
fn rand_time(&self) -> u32
fn rand_bytes(&self) -> &'a [u8] ⓘ
fn cipher_suites(&self) -> Vec<Option<&'static TlsCipherSuite>>
Source§impl<'a> Clone for TlsClientHelloContents<'a>
impl<'a> Clone for TlsClientHelloContents<'a>
Source§fn clone(&self) -> TlsClientHelloContents<'a>
fn clone(&self) -> TlsClientHelloContents<'a>
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<'a> Debug for TlsClientHelloContents<'a>
impl<'a> Debug for TlsClientHelloContents<'a>
Source§impl<'a> PartialEq for TlsClientHelloContents<'a>
impl<'a> PartialEq for TlsClientHelloContents<'a>
impl<'a> StructuralPartialEq for TlsClientHelloContents<'a>
Auto Trait Implementations§
impl<'a> Freeze for TlsClientHelloContents<'a>
impl<'a> RefUnwindSafe for TlsClientHelloContents<'a>
impl<'a> Send for TlsClientHelloContents<'a>
impl<'a> Sync for TlsClientHelloContents<'a>
impl<'a> Unpin for TlsClientHelloContents<'a>
impl<'a> UnwindSafe for TlsClientHelloContents<'a>
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