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§
Sourcefn on_handshake_complete(&self, conn_id: &str, is_client: bool)
fn on_handshake_complete(&self, conn_id: &str, is_client: bool)
Called when the handshake is complete
Sourcefn get_client_hello_extensions(&self, conn_id: &str) -> Vec<(u16, Vec<u8>)>
fn get_client_hello_extensions(&self, conn_id: &str) -> Vec<(u16, Vec<u8>)>
Called to get extension data for ClientHello
Sourcefn process_server_hello_extensions(
&self,
conn_id: &str,
extensions: &[(u16, Vec<u8>)],
) -> Result<(), TlsExtensionError>
fn process_server_hello_extensions( &self, conn_id: &str, extensions: &[(u16, Vec<u8>)], ) -> Result<(), TlsExtensionError>
Called to process ServerHello extensions
Sourcefn get_negotiation_result(&self, conn_id: &str) -> Option<NegotiationResult>
fn get_negotiation_result(&self, conn_id: &str) -> Option<NegotiationResult>
Get the negotiation result for a connection