Skip to content

Commit 49583c1

Browse files
authored
Merge pull request #4 from junkurihara/develop
0.0.18
2 parents 52e22da + f46e141 commit 49583c1

5 files changed

Lines changed: 18 additions & 14 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ resolver = "2"
44

55
[workspace.package]
66
edition = "2021"
7-
version = "0.0.17"
7+
version = "0.0.18"
88
authors = ["Jun Kurihara"]
99
homepage = "https://github.com/junkurihara/httpsig-rs"
1010
repository = "https://github.com/junkurihara/httpsig-rs"

httpsig-hyper/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ rust-version.workspace = true
1313
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1414

1515
[dependencies]
16-
httpsig = { path = "../httpsig", version = "0.0.17" }
16+
httpsig = { path = "../httpsig", version = "0.0.18" }
1717

1818
thiserror = { version = "2.0.11" }
1919
tracing = { version = "0.1.41" }
2020
futures = { version = "0.3.31", default-features = false, features = [
2121
"std",
2222
"async-await",
2323
] }
24-
indexmap = { version = "2.7.0" }
24+
indexmap = { version = "2.7.1" }
2525

2626
# content digest with rfc8941 structured field values
2727
sha2 = { version = "0.10.8", default-features = false }
28-
sfv = { version = "0.9.4" }
28+
sfv = { version = "0.10.4" }
2929

3030
# encoding
3131
base64 = { version = "0.22.1" }
@@ -34,7 +34,7 @@ base64 = { version = "0.22.1" }
3434
http = { version = "1.2.0" }
3535
http-body = { version = "1.0.1" }
3636
http-body-util = { version = "0.1.2" }
37-
bytes = { version = "1.9.0" }
37+
bytes = { version = "1.10.0" }
3838

3939

4040
[dev-dependencies]

httpsig/Cargo.toml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ rust-version.workspace = true
1515
[dependencies]
1616
thiserror = { version = "2.0.11" }
1717
tracing = { version = "0.1.41" }
18-
rustc-hash = { version = "2.1.0" }
19-
indexmap = { version = "2.7.0" }
18+
rustc-hash = { version = "2.1.1" }
19+
indexmap = { version = "2.7.1" }
2020
fxhash = { version = "0.2.1" }
21-
rand = { version = "0.8.5" }
21+
rand = { version = "0.9.0" }
2222

2323
# crypto
2424
pkcs8 = { version = "0.10.2", default-features = false, features = ["pem"] }
@@ -34,16 +34,19 @@ p256 = { version = "0.13.2", default-features = false, features = [
3434
"arithmetic",
3535
"ecdsa",
3636
] }
37-
p384 = { version = "0.13.0", default-features = false, features = [
37+
p384 = { version = "0.13.1", default-features = false, features = [
3838
"arithmetic",
3939
"ecdsa",
4040
] }
4141
hmac = { version = "0.12.1" }
4242
sha2 = { version = "0.10.8", default-features = false }
43-
bytes = { version = "1.9.0" }
43+
bytes = { version = "1.10.0" }
4444

4545
# encoding
4646
base64 = { version = "0.22.1" }
4747

4848
# for rfc8941 structured field values
49-
sfv = { version = "0.9.4" }
49+
sfv = { version = "0.10.4" }
50+
51+
[dev-dependencies]
52+
rand-085 = { package = "rand", version = "0.8.5" } # testing only

httpsig/src/crypto/asymmetric.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,8 @@ MCowBQYDK2VwAyEA1ixMQcxO46PLlgQfYS46ivFd+n0CcDHSKUnuhm3i1O0=
359359
let pk = PublicKey::from_bytes(AlgorithmName::Ed25519, ed25519_pk).unwrap();
360360
assert!(matches!(pk, PublicKey::Ed25519(_)));
361361

362-
let es256_sk = p256::ecdsa::SigningKey::random(&mut rand::thread_rng());
362+
let mut rng = rand_085::thread_rng();
363+
let es256_sk = p256::ecdsa::SigningKey::random(&mut rng);
363364
let es256_pk = es256_sk.verifying_key();
364365
let sk = SecretKey::from_bytes(AlgorithmName::EcdsaP256Sha256, es256_sk.to_bytes().as_ref()).unwrap();
365366
assert!(matches!(sk, SecretKey::EcdsaP256Sha256(_)));

httpsig/src/signature_params.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ impl HttpSignatureParams {
9595

9696
/// Set random nonce
9797
pub fn set_random_nonce(&mut self) -> &mut Self {
98-
let mut rng = rand::thread_rng();
99-
let nonce = rng.gen::<[u8; 32]>();
98+
let mut rng = rand::rng();
99+
let nonce = rng.random::<[u8; 32]>();
100100
self.nonce = Some(general_purpose::STANDARD.encode(nonce));
101101
self
102102
}

0 commit comments

Comments
 (0)