Function parse_tls_handshake_server_hello

Source
pub fn parse_tls_handshake_server_hello(
    i: &[u8],
) -> IResult<&[u8], TlsServerHelloContents<'_>>
Expand description

Parse handshake message contents for ServerHello (all TLS versions except 1.3 draft 18)

use tls_parser::*;

if let Ok((_, sh)) = parse_tls_handshake_server_hello(bytes) {
    println!("ServerHello TLS version: {}", sh.version);
    println!("  server chosen ciphersuites: {}", sh.cipher);
}