Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare 0.25 release, update to Rustls 0.22 #32

Merged
merged 3 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
**/*.rs.bk
Cargo.lock
.DS_Store
/.idea
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tokio-rustls"
version = "0.25.0-alpha.4"
version = "0.25.0"
license = "MIT/Apache-2.0"
repository = "https://github.com/rustls/tokio-rustls"
homepage = "https://github.com/rustls/tokio-rustls"
Expand All @@ -14,8 +14,8 @@ exclude = ["/.github", "/examples", "/scripts"]

[dependencies]
tokio = "1.0"
rustls = { version = "=0.22.0-alpha.6", default-features = false }
pki-types = { package = "rustls-pki-types", version = "0.2.2" }
rustls = { version = "0.22", default-features = false }
pki-types = { package = "rustls-pki-types", version = "1" }

[features]
default = ["logging", "tls12", "ring"]
Expand All @@ -29,6 +29,6 @@ argh = "0.1.1"
tokio = { version = "1.0", features = ["full"] }
futures-util = "0.3.1"
lazy_static = "1.1"
webpki-roots = "=0.26.0-alpha.2"
rustls-pemfile = "=2.0.0-alpha.2"
webpki = { package = "rustls-webpki", version = "=0.102.0-alpha.8", features = ["alloc", "std"] }
webpki-roots = "0.26"
rustls-pemfile = "2"
webpki = { package = "rustls-webpki", version = "0.102", features = ["alloc", "std"] }
1 change: 0 additions & 1 deletion examples/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ async fn main() -> io::Result<()> {
}

let config = rustls::ClientConfig::builder()
.with_safe_defaults()
.with_root_certificates(root_cert_store)
.with_no_client_auth(); // i guess this was previously the default?
let connector = TlsConnector::from(Arc::new(config));
Expand Down
1 change: 0 additions & 1 deletion examples/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ async fn main() -> io::Result<()> {
let flag_echo = options.echo_mode;

let config = rustls::ServerConfig::builder()
.with_safe_defaults()
.with_no_client_auth()
.with_single_cert(certs, key)
.map_err(|err| io::Error::new(io::ErrorKind::InvalidInput, err))?;
Expand Down
7 changes: 1 addition & 6 deletions tests/badssl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,7 @@ async fn get(
async fn test_tls12() -> io::Result<()> {
let mut root_store = rustls::RootCertStore::empty();
root_store.extend(webpki_roots::TLS_SERVER_ROOTS.iter().cloned());
let config = rustls::ClientConfig::builder()
.with_safe_default_cipher_suites()
.with_safe_default_kx_groups()
.with_protocol_versions(&[&rustls::version::TLS12])
.unwrap()
let config = rustls::ClientConfig::builder_with_protocol_versions(&[&rustls::version::TLS12])
.with_root_certificates(root_store)
.with_no_client_auth();

Expand Down Expand Up @@ -68,7 +64,6 @@ async fn test_modern() -> io::Result<()> {
let mut root_store = rustls::RootCertStore::empty();
root_store.extend(webpki_roots::TLS_SERVER_ROOTS.iter().cloned());
let config = rustls::ClientConfig::builder()
.with_safe_defaults()
.with_root_certificates(root_store)
.with_no_client_auth();
let config = Arc::new(config);
Expand Down
11 changes: 4 additions & 7 deletions tests/early-data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,10 @@ async fn test_0rtt() -> io::Result<()> {
root_store.add(cert.unwrap()).unwrap();
}

let mut config = rustls::ClientConfig::builder()
.with_safe_default_cipher_suites()
.with_safe_default_kx_groups()
.with_protocol_versions(&[&rustls::version::TLS13])
.unwrap()
.with_root_certificates(root_store)
.with_no_client_auth();
let mut config =
rustls::ClientConfig::builder_with_protocol_versions(&[&rustls::version::TLS13])
.with_root_certificates(root_store)
.with_no_client_auth();
config.enable_early_data = true;
let config = Arc::new(config);
let addr = SocketAddr::from(([127, 0, 0, 1], server_port));
Expand Down
3 changes: 0 additions & 3 deletions tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ lazy_static! {
.unwrap();

let config = rustls::ServerConfig::builder()
.with_safe_defaults()
.with_no_client_auth()
.with_single_cert(cert, key.into())
.unwrap();
Expand Down Expand Up @@ -117,7 +116,6 @@ async fn pass() -> io::Result<()> {
}

let config = rustls::ClientConfig::builder()
.with_safe_defaults()
.with_root_certificates(root_store)
.with_no_client_auth();
let config = Arc::new(config);
Expand All @@ -137,7 +135,6 @@ async fn fail() -> io::Result<()> {
}

let config = rustls::ClientConfig::builder()
.with_safe_defaults()
.with_root_certificates(root_store)
.with_no_client_auth();
let config = Arc::new(config);
Expand Down
2 changes: 0 additions & 2 deletions tests/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ mod utils {
.unwrap()
.unwrap();
let sconfig = ServerConfig::builder()
.with_safe_defaults()
.with_no_client_auth()
.with_single_cert(cert, key.into())
.unwrap();
Expand All @@ -31,7 +30,6 @@ mod utils {
}

let cconfig = ClientConfig::builder()
.with_safe_defaults()
.with_root_certificates(client_root_cert_store)
.with_no_client_auth();

Expand Down