Skip to content

Commit

Permalink
Fix compilation warning in ring library
Browse files Browse the repository at this point in the history
The following warning is being fixed:

warning: unused imports: `PKCS1`, `PSS`
  --> ring/src/rsa/padding.rs:21:13
   |
21 |     pkcs1::{PKCS1, RSA_PKCS1_SHA256, RSA_PKCS1_SHA384, RSA_PKCS1_SHA512},
   |             ^^^^^
22 |     pss::{PSS, RSA_PSS_SHA256, RSA_PSS_SHA384, RSA_PSS_SHA512},
   |           ^^^
   |
   = note: `#[warn(unused_imports)]` on by default

That warning was already fixed with this patch:
briansmith/ring@c4742e0

Once ring library version will be bumped up, this patch could be dropped.

Signed-off-by: Zbigniew Lukwinski <[email protected]>
  • Loading branch information
zlukwins committed Jan 14, 2025
1 parent 0b27f5c commit 1d0712c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From c4742e0cae849f08ff410a817c5266af41670b3d Mon Sep 17 00:00:00 2001
From: Brian Smith <[email protected]>
Date: Tue, 9 Jan 2024 10:52:37 -0800
Subject: [PATCH] NFC: Address Clippy unused import warning.

See https://github.com/briansmith/ring/issues/1887 about addressing this
messiness long-term.
---
src/rsa/padding.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/rsa/padding.rs b/src/rsa/padding.rs
index faf2422d9..9b79cd0f6 100644
--- a/src/rsa/padding.rs
+++ b/src/rsa/padding.rs
@@ -18,8 +18,8 @@ mod pkcs1;
mod pss;

pub use self::{
- pkcs1::{PKCS1, RSA_PKCS1_SHA256, RSA_PKCS1_SHA384, RSA_PKCS1_SHA512},
- pss::{PSS, RSA_PSS_SHA256, RSA_PSS_SHA384, RSA_PSS_SHA512},
+ pkcs1::{RSA_PKCS1_SHA256, RSA_PKCS1_SHA384, RSA_PKCS1_SHA512},
+ pss::{RSA_PSS_SHA256, RSA_PSS_SHA384, RSA_PSS_SHA512},
};
pub(super) use pkcs1::RSA_PKCS1_SHA1_FOR_LEGACY_USE_ONLY;

--
2.34.1

1 change: 1 addition & 0 deletions sh_script/pre-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ patch-ring() {
echo "Unsupported target for ring, builds may not work!"
;;
esac
git apply ../patches/ring/0001-NFC-Address-Clippy-unused-import-warning.patch
popd
}

Expand Down

0 comments on commit 1d0712c

Please sign in to comment.