diff --git a/build.rs b/build.rs index f0b6f7d..4f9f63b 100644 --- a/build.rs +++ b/build.rs @@ -22,8 +22,8 @@ fn main() { println!("cargo:rustc-cfg=have_min_max_version"); } - // TLS 1.3 requires libressl 3.2 - if version >= 0x3_02_01_00_0 { + // TLS 1.3 requires libressl 3.4.0 + if version >= 0x3_04_00_00_0 { println!("cargo:rustc-cfg=have_tls13_version"); } } diff --git a/src/imp/schannel.rs b/src/imp/schannel.rs index faeb5dc..62e5042 100644 --- a/src/imp/schannel.rs +++ b/src/imp/schannel.rs @@ -19,7 +19,6 @@ static PROTOCOLS: &'static [Protocol] = &[ Protocol::Tls10, Protocol::Tls11, Protocol::Tls12, - Protocol::Tls13, ]; fn convert_protocols(min: Option<::Protocol>, max: Option<::Protocol>) -> &'static [Protocol] { diff --git a/src/imp/security_framework.rs b/src/imp/security_framework.rs index 8a2489d..f56a916 100644 --- a/src/imp/security_framework.rs +++ b/src/imp/security_framework.rs @@ -49,7 +49,6 @@ fn convert_protocol(protocol: Protocol) -> SslProtocol { Protocol::Tlsv10 => SslProtocol::TLS1, Protocol::Tlsv11 => SslProtocol::TLS11, Protocol::Tlsv12 => SslProtocol::TLS12, - Protocol::Tlsv13 => SslProtocol::TLS13, } } diff --git a/src/lib.rs b/src/lib.rs index 3fb5f2b..8a3c4d1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -323,7 +323,7 @@ pub enum Protocol { /// The TLS 1.2 protocol. Tlsv12, /// The TLS 1.3 protocol. - #[cfg(any(target_os = "macos", target_os = "windows", target_os = "ios", have_tls13_version))] + #[cfg(have_tls13_version)] Tlsv13, }