Skip to content

Commit

Permalink
Update dependencies and version
Browse files Browse the repository at this point in the history
  • Loading branch information
bytedream committed Mar 24, 2024
1 parent c054735 commit 3683d75
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 21 deletions.
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "crunchyroll-rs"
version = "0.8.6"
version = "0.9.0"
authors = ["Crunchy Labs Maintainers"]
edition = "2021"
description = "Pure Rust implementation of the crunchyroll api."
Expand Down Expand Up @@ -28,19 +28,19 @@ async-trait = "0.1"
chrono = { version = ">=0.4.35", features = ["serde"] }
dash-mpd = { version = "0.15", default-features = false }
futures-util = { version = "0.3", features = ["std"], default-features = false }
jsonwebtoken = { version = "9.2", default-features = false }
jsonwebtoken = { version = "9.3", default-features = false }
# the patch version number is necessary for the 'reqwest' and 'rustls' dependencies to prevent incompatability errors
# (https://github.com/seanmonstar/reqwest/issues/1837)
reqwest = { version = "0.11.25", features = ["cookies", "json", "multipart", "rustls-tls"], default-features = false }
rustls = { version = "0.21.6", features = ["dangerous_configuration"] }
reqwest = { version = "0.12.1", features = ["cookies", "json", "multipart", "rustls-tls"], default-features = false }
rustls = "0.22.2"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_urlencoded = "0.7"
smart-default = "0.7"
tokio = { version = "1.36", features = ["sync"] }
webpki-roots = "0.26"

crunchyroll-rs-internal = { version = "0.8.6", path = "internal" }
crunchyroll-rs-internal = { version = "0.9.0", path = "internal" }

lazy_static = { version = "1.4", optional = true }
regex = { version = "1.10", default-features = false, features = ["std"], optional = true }
Expand Down
2 changes: 1 addition & 1 deletion internal/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "crunchyroll-rs-internal"
version = "0.8.6"
version = "0.9.0"
authors = ["Crunchy Labs Maintainers"]
edition = "2021"
description = "Internal crate for crunchyroll-rs. Do not use."
Expand Down
29 changes: 14 additions & 15 deletions src/crunchyroll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -608,21 +608,20 @@ mod auth {
/// to configure the behavior of the download client. Use [`CrunchyrollBuilder::client`] or
/// to set your built client.
pub fn predefined_client_builder() -> ClientBuilder {
let mut root_store = rustls::RootCertStore::empty();
root_store.add_trust_anchors(webpki_roots::TLS_SERVER_ROOTS.iter().map(|ta| {
rustls::OwnedTrustAnchor::from_subject_spki_name_constraints(
ta.subject.to_vec(),
ta.subject_public_key_info.to_vec(),
ta.name_constraints.clone().map(|nc| nc.to_vec()),
)
}));
let tls_config = rustls::ClientConfig::builder()
.with_cipher_suites(rustls::DEFAULT_CIPHER_SUITES)
.with_kx_groups(&[&rustls::kx_group::X25519])
.with_protocol_versions(&[&rustls::version::TLS12, &rustls::version::TLS13])
.unwrap()
.with_root_certificates(root_store)
.with_no_client_auth();
let tls_config = rustls::ClientConfig::builder_with_provider(
rustls::crypto::CryptoProvider {
cipher_suites: rustls::crypto::ring::DEFAULT_CIPHER_SUITES.to_vec(),
kx_groups: vec![rustls::crypto::ring::kx_group::X25519],
..rustls::crypto::ring::default_provider()
}
.into(),
)
.with_protocol_versions(&[&rustls::version::TLS12, &rustls::version::TLS13])
.unwrap()
.with_root_certificates(rustls::RootCertStore {
roots: webpki_roots::TLS_SERVER_ROOTS.into(),
})
.with_no_client_auth();

Client::builder()
.https_only(true)
Expand Down

0 comments on commit 3683d75

Please sign in to comment.