Trait TlsExtensionHooks

Source
pub trait TlsExtensionHooks: Send + Sync {
    // Required methods
    fn on_handshake_complete(&self, conn_id: &str, is_client: bool);
    fn get_client_hello_extensions(&self, conn_id: &str) -> Vec<(u16, Vec<u8>)>;
    fn process_server_hello_extensions(
        &self,
        conn_id: &str,
        extensions: &[(u16, Vec<u8>)],
    ) -> Result<(), TlsExtensionError>;
    fn get_negotiation_result(&self, conn_id: &str) -> Option<NegotiationResult>;
}
Expand description

Trait for hooking into TLS handshake events

Required Methods§

Source

fn on_handshake_complete(&self, conn_id: &str, is_client: bool)

Called when the handshake is complete

Source

fn get_client_hello_extensions(&self, conn_id: &str) -> Vec<(u16, Vec<u8>)>

Called to get extension data for ClientHello

Source

fn process_server_hello_extensions( &self, conn_id: &str, extensions: &[(u16, Vec<u8>)], ) -> Result<(), TlsExtensionError>

Called to process ServerHello extensions

Source

fn get_negotiation_result(&self, conn_id: &str) -> Option<NegotiationResult>

Get the negotiation result for a connection

Implementors§