@@ -21,7 +21,11 @@ pub trait Executor {
2121
2222/// Allows access to the TlsSession on handshake failure and when the exporter secret is ready.
2323pub trait ExporterHandler {
24- fn on_tls_handshake_failed ( & self , session : & impl TlsSession ) -> Option < Box < dyn Any + Send > > ;
24+ fn on_tls_handshake_failed (
25+ & self ,
26+ session : & impl TlsSession ,
27+ e : & ( dyn core:: error:: Error + Send + Sync + ' static ) ,
28+ ) -> Option < Box < dyn Any + Send > > ;
2529 fn on_tls_exporter_ready ( & self , session : & impl TlsSession ) -> Option < Box < dyn Any + Send > > ;
2630}
2731
@@ -30,6 +34,7 @@ impl ExporterHandler for () {
3034 fn on_tls_handshake_failed (
3135 & self ,
3236 _session : & impl TlsSession ,
37+ _e : & ( dyn core:: error:: Error + Send + Sync + ' static ) ,
3338 ) -> Option < Box < dyn std:: any:: Any + Send > > {
3439 None
3540 }
@@ -559,8 +564,9 @@ impl<S: CryptoSuite, H: ExporterHandler> tls::Context<S> for RemoteContext<'_, R
559564 fn on_tls_handshake_failed (
560565 & mut self ,
561566 session : & impl tls:: TlsSession ,
567+ e : & ( dyn core:: error:: Error + Send + Sync + ' static ) ,
562568 ) -> Result < ( ) , crate :: transport:: Error > {
563- if let Some ( context) = self . exporter_handler . on_tls_handshake_failed ( session) {
569+ if let Some ( context) = self . exporter_handler . on_tls_handshake_failed ( session, e ) {
564570 match self . send_to_quic . push ( Request :: TlsContext ( context) ) {
565571 Ok ( _) => ( ) ,
566572 Err ( _) => self . error = Some ( SLICE_ERROR ) ,
0 commit comments