From b8600041964b8774098421254596de332f8e26ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Sun, 30 Apr 2023 11:25:07 +0200 Subject: [PATCH] Update the rsa dependency --- Cargo.toml | 2 +- src/algorithm.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3a4a652..c75dc3a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ futures = { version = "0.3.28", default-features = false } log = { version = "0.4.17", default-features = false } nom = { version = "7.1.3", default-features = false } rand = { version = "0.8.5", default-features = false } -rsa = { version = "0.8.2", default-features = false, features = ["sha2", "std"] } +rsa = { version = "0.9.0", default-features = false, features = ["sha2", "std"] } sha2 = { version = "0.10.6", default-features = false, features = ["asm"] } sqlx = { version = "0.6.3", default-features = false, features = ["runtime-tokio-native-tls", "macros", "migrate", "sqlite", "time"] } tokio = { version = "1.27.0", default-features = false, features = ["rt-multi-thread", "io-std", "io-util", "macros", "sync", "time", "process"] } diff --git a/src/algorithm.rs b/src/algorithm.rs index 0fd63ab..697f515 100644 --- a/src/algorithm.rs +++ b/src/algorithm.rs @@ -54,7 +54,7 @@ impl Algorithm { } Self::Rsa2048Sha256 | Self::Rsa3072Sha256 | Self::Rsa4096Sha256 => { let private_key = RsaPrivateKey::from_pkcs8_der(&pk)?; - let signing_key = RsaSigningKey::::new_with_prefix(private_key); + let signing_key = RsaSigningKey::::new(private_key); let signature = signing_key.sign_prehash(data)?; Ok(signature.to_vec()) }