@@ -364,6 +364,20 @@ impl SslMethod {
364
364
unsafe { SslMethod ( TLS_server_method ( ) ) }
365
365
}
366
366
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
+
367
381
/// Constructs an `SslMethod` from a pointer to the underlying OpenSSL value.
368
382
///
369
383
/// # Safety
@@ -4288,7 +4302,7 @@ cfg_if! {
4288
4302
}
4289
4303
cfg_if ! {
4290
4304
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 } ;
4292
4306
} else {
4293
4307
use ffi:: {
4294
4308
SSLv23_method as TLS_method , DTLSv1_method as DTLS_method , SSLv23_client_method as TLS_client_method ,
0 commit comments