@@ -1047,27 +1047,6 @@ impl SslContextBuilder {
1047
1047
unsafe { cvt ( ffi:: SSL_CTX_set_tmp_ecdh ( self . as_ptr ( ) , key. as_ptr ( ) ) as c_int ) . map ( |_| ( ) ) }
1048
1048
}
1049
1049
1050
- /// Sets the callback which will generate parameters to be used during ephemeral elliptic curve
1051
- /// Diffie-Hellman key exchange.
1052
- ///
1053
- /// The callback is provided with a reference to the `Ssl` for the session, as well as a boolean
1054
- /// indicating if the selected cipher is export-grade, and the key length. The export and key
1055
- /// length options are archaic and should be ignored in almost all cases.
1056
- ///
1057
- /// Requires OpenSSL 1.0.1 or 1.0.2.
1058
- #[ corresponds( SSL_CTX_set_tmp_ecdh_callback ) ]
1059
- #[ cfg( all( ossl101, not( ossl110) ) ) ]
1060
- #[ deprecated( note = "this function leaks memory and does not exist on newer OpenSSL versions" ) ]
1061
- pub fn set_tmp_ecdh_callback < F > ( & mut self , callback : F )
1062
- where
1063
- F : Fn ( & mut SslRef , bool , u32 ) -> Result < EcKey < Params > , ErrorStack > + ' static + Sync + Send ,
1064
- {
1065
- unsafe {
1066
- self . set_ex_data ( SslContext :: cached_ex_index :: < F > ( ) , callback) ;
1067
- ffi:: SSL_CTX_set_tmp_ecdh_callback ( self . as_ptr ( ) , Some ( raw_tmp_ecdh :: < F > ) ) ;
1068
- }
1069
- }
1070
-
1071
1050
/// Use the default locations of trusted certificates for verification.
1072
1051
///
1073
1052
/// These locations are read from the `SSL_CERT_FILE` and `SSL_CERT_DIR` environment variables
@@ -1766,18 +1745,6 @@ impl SslContextBuilder {
1766
1745
}
1767
1746
}
1768
1747
1769
- #[ deprecated( since = "0.10.10" , note = "renamed to `set_psk_client_callback`" ) ]
1770
- #[ cfg( not( osslconf = "OPENSSL_NO_PSK" ) ) ]
1771
- pub fn set_psk_callback < F > ( & mut self , callback : F )
1772
- where
1773
- F : Fn ( & mut SslRef , Option < & [ u8 ] > , & mut [ u8 ] , & mut [ u8 ] ) -> Result < usize , ErrorStack >
1774
- + ' static
1775
- + Sync
1776
- + Send ,
1777
- {
1778
- self . set_psk_client_callback ( callback)
1779
- }
1780
-
1781
1748
/// Sets the callback for providing an identity and pre-shared key for a TLS-PSK server.
1782
1749
///
1783
1750
/// The callback will be called with the SSL context, an identity provided by the client,
@@ -2946,23 +2913,6 @@ impl SslRef {
2946
2913
unsafe { cvt ( ffi:: SSL_set_tmp_ecdh ( self . as_ptr ( ) , key. as_ptr ( ) ) as c_int ) . map ( |_| ( ) ) }
2947
2914
}
2948
2915
2949
- /// Like [`SslContextBuilder::set_tmp_ecdh_callback`].
2950
- ///
2951
- /// Requires OpenSSL 1.0.1 or 1.0.2.
2952
- #[ corresponds( SSL_set_tmp_ecdh_callback ) ]
2953
- #[ cfg( all( ossl101, not( ossl110) ) ) ]
2954
- #[ deprecated( note = "this function leaks memory and does not exist on newer OpenSSL versions" ) ]
2955
- pub fn set_tmp_ecdh_callback < F > ( & mut self , callback : F )
2956
- where
2957
- F : Fn ( & mut SslRef , bool , u32 ) -> Result < EcKey < Params > , ErrorStack > + ' static + Sync + Send ,
2958
- {
2959
- unsafe {
2960
- // this needs to be in an Arc since the callback can register a new callback!
2961
- self . set_ex_data ( Ssl :: cached_ex_index ( ) , Arc :: new ( callback) ) ;
2962
- ffi:: SSL_set_tmp_ecdh_callback ( self . as_ptr ( ) , Some ( raw_tmp_ecdh_ssl :: < F > ) ) ;
2963
- }
2964
- }
2965
-
2966
2916
/// Like [`SslContextBuilder::set_ecdh_auto`].
2967
2917
///
2968
2918
/// Requires OpenSSL 1.0.2 or LibreSSL.
@@ -3098,11 +3048,6 @@ impl SslRef {
3098
3048
}
3099
3049
}
3100
3050
3101
- #[ deprecated( since = "0.10.5" , note = "renamed to `version_str`" ) ]
3102
- pub fn version ( & self ) -> & str {
3103
- self . version_str ( )
3104
- }
3105
-
3106
3051
/// Returns the protocol version of the session.
3107
3052
#[ corresponds( SSL_version ) ]
3108
3053
pub fn version2 ( & self ) -> Option < SslVersion > {
@@ -4276,22 +4221,6 @@ impl<S: Read + Write> SslStream<S> {
4276
4221
} )
4277
4222
}
4278
4223
4279
- /// Constructs an `SslStream` from a pointer to the underlying OpenSSL `SSL` struct.
4280
- ///
4281
- /// This is useful if the handshake has already been completed elsewhere.
4282
- ///
4283
- /// # Safety
4284
- ///
4285
- /// The caller must ensure the pointer is valid.
4286
- #[ deprecated(
4287
- since = "0.10.32" ,
4288
- note = "use Ssl::from_ptr and SslStream::new instead"
4289
- ) ]
4290
- pub unsafe fn from_raw_parts ( ssl : * mut ffi:: SSL , stream : S ) -> Self {
4291
- let ssl = Ssl :: from_ptr ( ssl) ;
4292
- Self :: new ( ssl, stream) . unwrap ( )
4293
- }
4294
-
4295
4224
/// Read application data transmitted by a client before handshake completion.
4296
4225
///
4297
4226
/// Useful for reducing latency, but vulnerable to replay attacks. Call
@@ -4902,21 +4831,6 @@ impl<S> SslStreamBuilder<S> {
4902
4831
pub fn ssl_mut ( & mut self ) -> & mut SslRef {
4903
4832
& mut self . inner . ssl
4904
4833
}
4905
-
4906
- /// Set the DTLS MTU size.
4907
- ///
4908
- /// It will be ignored if the value is smaller than the minimum packet size
4909
- /// the DTLS protocol requires.
4910
- ///
4911
- /// # Panics
4912
- /// This function panics if the given mtu size can't be represented in a positive `c_long` range
4913
- #[ deprecated( note = "Use SslRef::set_mtu instead" , since = "0.10.30" ) ]
4914
- pub fn set_dtls_mtu_size ( & mut self , mtu_size : usize ) {
4915
- unsafe {
4916
- let bio = self . inner . ssl . get_raw_rbio ( ) ;
4917
- bio:: set_dtls_mtu_size :: < S > ( bio, mtu_size) ;
4918
- }
4919
- }
4920
4834
}
4921
4835
4922
4836
/// The result of a shutdown request.
0 commit comments