Skip to content

Commit

Permalink
TLS 1.3 version support
Browse files Browse the repository at this point in the history
  • Loading branch information
amousset committed Aug 16, 2023
1 parent 9490734 commit c68a324
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
Expand Down
1 change: 0 additions & 1 deletion src/imp/schannel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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] {
Expand Down
1 change: 0 additions & 1 deletion src/imp/security_framework.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand Down

0 comments on commit c68a324

Please sign in to comment.