Skip to content

Commit 1e65774

Browse files
committed
TLS 1.3 version support
1 parent 9490734 commit 1e65774

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ fn main() {
2222
println!("cargo:rustc-cfg=have_min_max_version");
2323
}
2424

25-
// TLS 1.3 requires libressl 3.2
26-
if version >= 0x3_02_01_00_0 {
25+
// TLS 1.3 requires libressl 3.4.0
26+
if version >= 0x3_04_00_00_0 {
2727
println!("cargo:rustc-cfg=have_tls13_version");
2828
}
2929
}

src/imp/schannel.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ static PROTOCOLS: &'static [Protocol] = &[
1919
Protocol::Tls10,
2020
Protocol::Tls11,
2121
Protocol::Tls12,
22-
Protocol::Tls13,
2322
];
2423

2524
fn convert_protocols(min: Option<::Protocol>, max: Option<::Protocol>) -> &'static [Protocol] {

src/imp/security_framework.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ fn convert_protocol(protocol: Protocol) -> SslProtocol {
4949
Protocol::Tlsv10 => SslProtocol::TLS1,
5050
Protocol::Tlsv11 => SslProtocol::TLS11,
5151
Protocol::Tlsv12 => SslProtocol::TLS12,
52-
Protocol::Tlsv13 => SslProtocol::TLS13,
5352
}
5453
}
5554

src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,9 @@ pub enum Protocol {
323323
/// The TLS 1.2 protocol.
324324
Tlsv12,
325325
/// The TLS 1.3 protocol.
326-
#[cfg(any(target_os = "macos", target_os = "windows", target_os = "ios", have_tls13_version))]
326+
///
327+
/// Requires OpenSSL 1.1.1 or LibreSSL 3.4.0 or newer.
328+
#[cfg(have_tls13_version)]
327329
Tlsv13,
328330
}
329331

src/test.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ macro_rules! p {
1616
};
1717
}
1818

19+
#[cfg(have_tls13_version)]
1920
#[test]
2021
fn connect_google_tls13() {
2122
let builder = p!(

0 commit comments

Comments
 (0)