@@ -674,20 +674,20 @@ impl AlpnError {
674
674
pub const NOACK : AlpnError = AlpnError ( ffi:: SSL_TLSEXT_ERR_NOACK ) ;
675
675
}
676
676
677
- /// The result of a client hello callback.
677
+ /// An error returned from a client hello callback.
678
678
///
679
679
/// Requires OpenSSL 1.1.1 or newer.
680
680
#[ cfg( ossl111) ]
681
681
#[ derive( Debug , Copy , Clone , PartialEq , Eq ) ]
682
- pub struct ClientHelloResponse ( c_int ) ;
682
+ pub struct ClientHelloError ( c_int ) ;
683
683
684
684
#[ cfg( ossl111) ]
685
- impl ClientHelloResponse {
686
- /// Continue the handshake .
687
- pub const SUCCESS : ClientHelloResponse = ClientHelloResponse ( ffi:: SSL_CLIENT_HELLO_SUCCESS ) ;
685
+ impl ClientHelloError {
686
+ /// Terminate the connection .
687
+ pub const ERROR : ClientHelloError = ClientHelloError ( ffi:: SSL_CLIENT_HELLO_ERROR ) ;
688
688
689
689
/// Return from the handshake with an `ErrorCode::WANT_CLIENT_HELLO_CB` error.
690
- pub const RETRY : ClientHelloResponse = ClientHelloResponse ( ffi:: SSL_CLIENT_HELLO_RETRY ) ;
690
+ pub const RETRY : ClientHelloError = ClientHelloError ( ffi:: SSL_CLIENT_HELLO_RETRY ) ;
691
691
}
692
692
693
693
/// An error returned from a certificate selection callback.
@@ -2085,7 +2085,7 @@ impl SslContextBuilder {
2085
2085
#[ cfg( ossl111) ]
2086
2086
pub fn set_client_hello_callback < F > ( & mut self , callback : F )
2087
2087
where
2088
- F : Fn ( & mut SslRef , & mut SslAlert ) -> Result < ClientHelloResponse , ErrorStack >
2088
+ F : Fn ( & mut SslRef , & mut SslAlert ) -> Result < ( ) , ClientHelloError >
2089
2089
+ ' static
2090
2090
+ Sync
2091
2091
+ Send ,
0 commit comments