Skip to content

DTLS v1.2 support in newer OpenSSL (1.1 and 3.0) and LibreSSL 3.3.2 #1827

Open
@dbodden-pesa

Description

@dbodden-pesa

We are using DTLSv1_2 methods w/ OpenSSL 3.

These are not exposed, however I tested with the following diff, and it seems to work:

diff --git a/openssl-sys/src/handwritten/ssl.rs b/openssl-sys/src/handwritten/ssl.rs
index f179a04a..e11be066 100644
--- a/openssl-sys/src/handwritten/ssl.rs
+++ b/openssl-sys/src/handwritten/ssl.rs
@@ -679,6 +679,8 @@ cfg_if! {
             pub fn TLS_server_method() -> *const SSL_METHOD;
 
             pub fn TLS_client_method() -> *const SSL_METHOD;
+
+            pub fn DTLSv1_2_method() -> *const SSL_METHOD;
         }
     } else {
         extern "C" {
@@ -699,7 +701,7 @@ cfg_if! {
 
             pub fn DTLSv1_method() -> *const SSL_METHOD;
 
-            #[cfg(ossl102)]
+            #[cfg(any(ossl102,libressl332))]
             pub fn DTLSv1_2_method() -> *const SSL_METHOD;
         }
     }

I have not tested the LibreSSL related change, but according to this link it should be correct:

openbsd/src@e6d8839

I can make a pull request if you like. Not sure the general upstreaming guidelines.

-Doug

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions