Skip to content

Commit

Permalink
disable tls downgrade on native tls
Browse files Browse the repository at this point in the history
  • Loading branch information
lovasoa committed Nov 20, 2024
1 parent b073baf commit e7663f9
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions sqlx-core/src/net/tls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,8 @@ where
MaybeTlsStream::Tls(stream) => {
#[cfg(feature = "_tls-rustls")]
let raw = stream.into_inner().0;

#[cfg(all(feature = "_rt-async-std", feature = "_tls-native-tls"))]
let raw = stream.into_inner();

#[cfg(all(not(feature = "_rt-async-std"), feature = "_tls-native-tls"))]
let raw = stream.into_inner().into_inner().into_inner();

#[cfg(feature = "_tls-native-tls")]
let raw = unimplemented!("No way to downgrade a native-tls stream, use rustls instead, or never disable tls");
raw

Check warning on line 150 in sqlx-core/src/net/tls/mod.rs

View workflow job for this annotation

GitHub Actions / MySQL (8, async-std, native-tls)

unreachable expression

Check warning on line 150 in sqlx-core/src/net/tls/mod.rs

View workflow job for this annotation

GitHub Actions / MySQL (8, async-std, native-tls)

unreachable expression

Check warning on line 150 in sqlx-core/src/net/tls/mod.rs

View workflow job for this annotation

GitHub Actions / MySQL (8, tokio, native-tls)

unreachable expression

Check warning on line 150 in sqlx-core/src/net/tls/mod.rs

View workflow job for this annotation

GitHub Actions / MySQL (8, tokio, native-tls)

unreachable expression

Check warning on line 150 in sqlx-core/src/net/tls/mod.rs

View workflow job for this annotation

GitHub Actions / MySQL (8, actix, native-tls)

unreachable expression

Check warning on line 150 in sqlx-core/src/net/tls/mod.rs

View workflow job for this annotation

GitHub Actions / MySQL (5_7, async-std, native-tls)

unreachable expression

Check warning on line 150 in sqlx-core/src/net/tls/mod.rs

View workflow job for this annotation

GitHub Actions / MySQL (5_7, async-std, native-tls)

unreachable expression
}

Expand Down

0 comments on commit e7663f9

Please sign in to comment.