#[derive(Debug)]
pub struct CommonTlsPostHandshakeInformation<'tls_session>
{
pub negotiated_protocol_version: ProtocolVersion,
pub negotiated_cipher_suite: &'static SupportedCipherSuite,
pub agreed_application_layer_protocol_negotiation_protocol: Option<&'tls_session [u8]>,
pub peer_certificates: Vec<Certificate>,
}
impl<'tls_session> CommonTlsPostHandshakeInformation<'tls_session>
{
#[inline(always)]
pub fn from_tls_session(tls_session: &'tls_session impl Session) -> Self
{
Self
{
negotiated_protocol_version: tls_session.get_protocol_version().unwrap(),
negotiated_cipher_suite: tls_session.get_negotiated_ciphersuite().unwrap(),
agreed_application_layer_protocol_negotiation_protocol: tls_session.get_alpn_protocol(),
peer_certificates: tls_session.get_peer_certificates().unwrap(),
}
}
#[inline(always)]
pub fn calculate_tls_server_end_point_channel_binding_certificate_hash(&self) -> Vec<u8>
{
unimplemented!("Will be implemented when a dependent protocol first needs SCRAM-SHA-256-PLUS SASL authentication")
}
}