Skip to content

Commit 980298b

Browse files
committed
experimental(tls): Change the TLS provider to rustls-rustcrypto
1 parent d375ad0 commit 980298b

14 files changed

Lines changed: 539 additions & 267 deletions

File tree

Cargo.lock

Lines changed: 516 additions & 242 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/llrt_numbers/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ryu = { version = "1", default-features = false }
1919
[dev-dependencies]
2020
criterion = { version = "0.8", default-features = false }
2121
llrt_test = { version = "0.7.0-beta", path = "../llrt_test" }
22-
rand = { version = "0.10.0-rc.5", features = ["alloc"], default-features = false }
22+
rand = { version = "0.10.0-rc.8", features = ["alloc"], default-features = false }
2323

2424
[[bench]]
2525
name = "numbers"

libs/llrt_numbers/benches/numbers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
use criterion::{criterion_group, criterion_main, Criterion};
55
use llrt_numbers::i64_to_base_n;
6-
use rand::Rng;
6+
use rand::RngExt;
77
use std::{fmt::Write, hint::black_box};
88

99
macro_rules! write_formatted {

libs/llrt_numbers/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ fn number_to_string<'js>(
286286
#[cfg(test)]
287287
mod test {
288288

289-
use rand::Rng;
289+
use rand::RngExt;
290290

291291
use crate::{float_to_string, i64_to_base_n};
292292

llrt_core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ llrt_utils = { path = "../libs/llrt_utils", features = ["all"] }
3232
once_cell = { version = "1", features = ["std"], default-features = false }
3333
phf = { version = "0.13", default-features = false }
3434
quick-xml = { version = "0.39", default-features = false }
35-
rand = { version = "0.10.0-rc.5", features = [
35+
rand = { version = "0.10.0-rc.8", features = [
3636
"alloc",
3737
"thread_rng",
3838
], default-features = false }

modules/llrt_crypto/Cargo.toml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ llrt_context = { version = "0.7.0-beta", path = "../../libs/llrt_context" }
4242
llrt_encoding = { version = "0.7.0-beta", path = "../../libs/llrt_encoding" }
4343
llrt_utils = { version = "0.7.0-beta", path = "../../libs/llrt_utils", default-features = false }
4444
once_cell = { version = "1", features = ["std"], default-features = false }
45-
rand = { version = "0.10.0-rc.5", features = [
45+
rand = { version = "0.10.0-rc.8", features = [
4646
"std",
4747
"std_rng",
4848
"thread_rng",
@@ -69,41 +69,39 @@ der = { version = "0.8.0-rc.10", features = [
6969
"derive",
7070
"alloc",
7171
], default-features = false, optional = true }
72-
ecdsa = { version = "0.17.0-rc.9", default-features = false, optional = true }
73-
elliptic-curve = { version = "0.14.0-rc.17", features = [
72+
ecdsa = { version = "0.17.0-rc.14", default-features = false, optional = true }
73+
elliptic-curve = { version = "0.14.0-rc.24", features = [
7474
"alloc",
7575
], default-features = false, optional = true }
7676
llrt_json = { version = "0.7.0-beta", path = "../../libs/llrt_json", optional = true }
77-
md-5 = { version = "0.11.0-rc.3", default-features = false }
78-
rsa = { version = "0.10.0-rc.10", features = [
77+
md-5 = { version = "0.11.0-rc.4", default-features = false }
78+
rsa = { version = "0.10.0-rc.14", features = [
7979
"std",
8080
"sha2",
8181
"encoding",
82-
"os_rng",
8382
], default-features = false, optional = true }
84-
p256 = { version = "0.14.0-rc.1", features = [
83+
p256 = { version = "0.14.0-rc.6", features = [
8584
"ecdh",
8685
"ecdsa",
8786
"pkcs8",
8887
], default-features = false, optional = true }
89-
p384 = { version = "0.14.0-rc.1", features = [
88+
p384 = { version = "0.14.0-rc.6", features = [
9089
"ecdh",
9190
"ecdsa",
9291
"pkcs8",
9392
], default-features = false, optional = true }
94-
p521 = { version = "0.14.0-rc.1", features = [
93+
p521 = { version = "0.14.0-rc.6", features = [
9594
"ecdh",
9695
"ecdsa",
9796
"pkcs8",
9897
], default-features = false, optional = true }
99-
100-
pkcs8 = { version = "0.11.0-rc.8", default-features = false, features = [
98+
pkcs8 = { version = "0.11.0-rc.10", default-features = false, features = [
10199
"alloc",
102100
], optional = true }
103101
spki = { version = "0.8.0-rc.4", features = [
104102
"alloc",
105103
], default-features = false, optional = true }
106-
x25519-dalek = { version = "3.0.0-pre.3", features = [
104+
x25519-dalek = { version = "3.0.0-pre.5", features = [
107105
"static_secrets",
108106
"zeroize",
109107
], default-features = false, optional = true }

modules/llrt_crypto/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use llrt_utils::{
1919
result::ResultExt,
2020
};
2121
use once_cell::sync::Lazy;
22-
use rand::Rng;
22+
use rand::RngExt;
2323
use ring::rand::{SecureRandom, SystemRandom};
2424
#[cfg(feature = "subtle-rs")]
2525
use rquickjs::prelude::Async;

modules/llrt_crypto/src/subtle/generate_key.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ fn generate_key(ctx: &Ctx<'_>, algorithm: &KeyAlgorithm) -> Result<(Vec<u8>, Vec
135135
},
136136
EllipticCurve::P521 => {
137137
let mut rng = rand::rng();
138-
let key = p521::SecretKey::try_from_rng(&mut rng).or_throw(ctx)?;
138+
#[allow(deprecated)]
139+
let key = p521::SecretKey::random(&mut rng);
139140
let pkcs8 = key.to_pkcs8_der().or_throw(ctx)?;
140141
private_key = pkcs8.as_bytes().into();
141142
public_or_secret_key = key.public_key().to_sec1_bytes().into();

modules/llrt_fetch/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pin-project-lite = { version = "0.2", default-features = false }
4343
percent-encoding = { version = "2", features = [
4444
"std",
4545
], default-features = false }
46-
rand = { version = "0.10.0-rc.5", features = [
46+
rand = { version = "0.10.0-rc.8", features = [
4747
"std",
4848
"thread_rng",
4949
], default-features = false }

modules/llrt_fetch/src/form_data.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::{
77

88
use llrt_buffer::{Blob, File};
99
use llrt_utils::{class::IteratorDef, object::map_to_entries, result::ResultExt};
10-
use rand::Rng;
10+
use rand::RngExt;
1111
use rquickjs::{
1212
atom::PredefinedAtom, class::Trace, prelude::Opt, Array, Class, Ctx, Exception, Function,
1313
IntoJs, JsLifetime, Result, Value,

0 commit comments

Comments
 (0)