From 4f0d5bfee266eb5c1361e07300699b5e0e533b65 Mon Sep 17 00:00:00 2001 From: Charlie Li <git@vishwin.info> Date: Fri, 24 Sep 2021 16:11:27 -0400 Subject: [PATCH] Expose TLS1_3_VERSION when using LibreSSL 3.4.0+ --- openssl-sys/src/tls1.rs | 2 +- openssl/src/ssl/mod.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openssl-sys/src/tls1.rs b/openssl-sys/src/tls1.rs index 86c6c8f35..d02f5c049 100644 --- a/openssl-sys/src/tls1.rs +++ b/openssl-sys/src/tls1.rs @@ -7,7 +7,7 @@ use *; pub const TLS1_VERSION: c_int = 0x301; pub const TLS1_1_VERSION: c_int = 0x302; pub const TLS1_2_VERSION: c_int = 0x303; -#[cfg(ossl111)] +#[cfg(any(ossl111, libressl340))] pub const TLS1_3_VERSION: c_int = 0x304; pub const TLS1_AD_DECODE_ERROR: c_int = 50; diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs index 744306696..6896a22f1 100644 --- a/openssl/src/ssl/mod.rs +++ b/openssl/src/ssl/mod.rs @@ -611,8 +611,8 @@ impl SslVersion { /// TLSv1.3 /// - /// Requires OpenSSL 1.1.1 or newer. - #[cfg(ossl111)] + /// Requires OpenSSL 1.1.1 or LibreSSL 3.4.0 or newer. + #[cfg(any(ossl111, libressl340))] pub const TLS1_3: SslVersion = SslVersion(ffi::TLS1_3_VERSION); } -- GitLab