mirror of https://github.com/fafhrd91/actix-web
review nits
This commit is contained in:
parent
7993ab0959
commit
56ddb771d7
|
@ -2,8 +2,8 @@
|
|||
|
||||
## Unreleased
|
||||
|
||||
- Minimum supported Rust version (MSRV) is now 1.72.
|
||||
- Add `TestServerConfig::rustls_0_23()` method for Rustls v0.23 support behind new `rustls-0_23` crate feature.
|
||||
- Minimum supported Rust version (MSRV) is now 1.72.
|
||||
|
||||
## 0.1.3
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ rustls-0_20 = ["tls-rustls-0_20", "actix-http/rustls-0_20", "awc/rustls-0_20"]
|
|||
rustls-0_21 = ["tls-rustls-0_21", "actix-http/rustls-0_21", "awc/rustls-0_21"]
|
||||
# TLS via Rustls v0.22
|
||||
rustls-0_22 = ["tls-rustls-0_22", "actix-http/rustls-0_22", "awc/rustls-0_22-webpki-roots"]
|
||||
# TLS via Rustls v0.22
|
||||
# TLS via Rustls v0.23
|
||||
rustls-0_23 = ["tls-rustls-0_23", "actix-http/rustls-0_23", "awc/rustls-0_23-webpki-roots"]
|
||||
|
||||
# TLS via OpenSSL
|
||||
|
|
|
@ -583,7 +583,7 @@ impl TestServerConfig {
|
|||
self
|
||||
}
|
||||
|
||||
/// Accepts secure connections via Rustls v0.22.
|
||||
/// Accepts secure connections via Rustls v0.23.
|
||||
#[cfg(feature = "rustls-0_23")]
|
||||
pub fn rustls_0_23(mut self, config: tls_rustls_0_23::ServerConfig) -> Self {
|
||||
self.stream = StreamType::Rustls023(config);
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
- Add `HttpServer::{bind_rustls_0_23, listen_rustls_0_23}()` builder methods.
|
||||
- Add `HttpServer::tls_handshake_timeout` builder method for `rustls-0_22` and `rustls-0_23`
|
||||
|
||||
|
||||
### Changed
|
||||
|
||||
- Update `brotli` dependency to `6`.
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
## Unreleased
|
||||
|
||||
- Add `rustls-0_23`, `rustls-0_23-webpki-roots`, and `rustls-0_23-native-roots` crate features.
|
||||
- Add `awc::Connector::rustls_0_23()` constructor.
|
||||
- Fix `rustls-0_22-native-roots` root store lookup
|
||||
- Update `brotli` dependency to `6`.
|
||||
- Minimum supported Rust version (MSRV) is now 1.72.
|
||||
- Add `rustls-0_23`, `rustls-0_23-webpki-roots`, and `rustls-0_23-native-roots` crate features.
|
||||
- Add `awc::Connector::rustls_0_23()` method.
|
||||
- Fix `rustls-0_22-native-roots` root store lookup
|
||||
|
||||
## 3.4.0
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ impl ClientBuilder {
|
|||
/// Note: If the `rustls-0_23` feature is enabled and neither `rustls-0_23-native-roots` nor
|
||||
/// `rustls-0_23-webpki-roots` are enabled, this ClientBuilder will build without TLS. In order
|
||||
/// to enable TLS in this scenario, a custom `Connector` _must_ be added to the builder before
|
||||
/// finishing constrution.
|
||||
/// finishing construction.
|
||||
#[allow(clippy::new_ret_no_self)]
|
||||
pub fn new() -> ClientBuilder<
|
||||
impl Service<
|
||||
|
|
|
@ -86,9 +86,10 @@ pub struct Connector<T> {
|
|||
impl Connector<()> {
|
||||
/// Create a new connector with default TLS settings
|
||||
///
|
||||
/// Panicking:
|
||||
/// # Panics
|
||||
///
|
||||
/// - When the `rustls-0_23-webpki-roots` or `rustls-0_23-native-roots` features are enabled
|
||||
/// and no default cyrpto provider has been loaded, this method will panic.
|
||||
/// and no default crypto provider has been loaded, this method will panic.
|
||||
/// - When the `rustls-0_23-native-roots` or `rustls-0_22-native-roots` features are enabled
|
||||
/// and the runtime system has no native root certificates, this method will panic.
|
||||
#[allow(clippy::new_ret_no_self, clippy::let_unit_value)]
|
||||
|
@ -200,8 +201,8 @@ impl Connector<()> {
|
|||
OurTlsConnector::OpensslBuilder(ssl)
|
||||
}
|
||||
} else {
|
||||
/// Provides an empty TLS connector when no TLS feature is enabled, or when
|
||||
/// rustls-0_23 is enabled.
|
||||
/// Provides an empty TLS connector when no TLS feature is enabled, or when only the
|
||||
/// `rustls-0_23` crate feature is enabled.
|
||||
fn build_tls(_: Vec<Vec<u8>>) -> OurTlsConnector {
|
||||
OurTlsConnector::None
|
||||
}
|
||||
|
@ -316,7 +317,8 @@ where
|
|||
///
|
||||
/// In order to enable ALPN, set the `.alpn_protocols` field on the ClientConfig to the
|
||||
/// following:
|
||||
/// ```rust,ignore
|
||||
///
|
||||
/// ```no_run
|
||||
/// vec![b"h2".to_vec(), b"http/1.1".to_vec()]
|
||||
/// ```
|
||||
#[cfg(feature = "rustls-0_23")]
|
||||
|
|
Loading…
Reference in New Issue