@@ -364,6 +364,20 @@ impl SslMethod {
364364 unsafe { SslMethod ( TLS_server_method ( ) ) }
365365 }
366366
367+ /// Support all versions of the DTLS protocol, explicitly as a client.
368+ #[ corresponds( DTLS_client_method ) ]
369+ #[ cfg( any( boringssl, ossl110, libressl291) ) ]
370+ pub fn dtls_client ( ) -> SslMethod {
371+ unsafe { SslMethod ( DTLS_client_method ( ) ) }
372+ }
373+
374+ /// Support all versions of the DTLS protocol, explicitly as a server.
375+ #[ corresponds( DTLS_method ) ]
376+ #[ cfg( any( boringssl, ossl110, libressl291) ) ]
377+ pub fn dtls_server ( ) -> SslMethod {
378+ unsafe { SslMethod ( DTLS_server_method ( ) ) }
379+ }
380+
367381 /// Constructs an `SslMethod` from a pointer to the underlying OpenSSL value.
368382 ///
369383 /// # Safety
@@ -4288,7 +4302,7 @@ cfg_if! {
42884302}
42894303cfg_if ! {
42904304 if #[ cfg( any( boringssl, ossl110, libressl291) ) ] {
4291- use ffi:: { TLS_method , DTLS_method , TLS_client_method , TLS_server_method } ;
4305+ use ffi:: { TLS_method , DTLS_method , TLS_client_method , TLS_server_method , DTLS_server_method , DTLS_client_method } ;
42924306 } else {
42934307 use ffi:: {
42944308 SSLv23_method as TLS_method , DTLSv1_method as DTLS_method , SSLv23_client_method as TLS_client_method ,
0 commit comments