mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-04 11:03:27 +00:00
Add missing zeroize to Identity (#1962)
Add derive(ZeroizeOnDrop) to Identity
This commit is contained in:
parent
23db27a2ab
commit
04d6b2646a
15
Cargo.lock
generated
15
Cargo.lock
generated
|
@ -7781,6 +7781,7 @@ dependencies = [
|
|||
"tracing",
|
||||
"tracing-subscriber",
|
||||
"uuid",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -10919,6 +10920,20 @@ name = "zeroize"
|
|||
version = "1.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d"
|
||||
dependencies = [
|
||||
"zeroize_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zeroize_derive"
|
||||
version = "1.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.42",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zip"
|
||||
|
|
|
@ -44,7 +44,7 @@ libp2p-quic = { version = "0.9.3", features = ["tokio"] }
|
|||
mdns-sd = "0.9.3"
|
||||
rand_core = { version = "0.6.4" }
|
||||
streamunordered = "0.5.3"
|
||||
|
||||
zeroize = { version = "1.7.0", features = ["derive"]}
|
||||
|
||||
[dev-dependencies]
|
||||
tokio = { workspace = true, features = ["rt-multi-thread"] }
|
||||
|
|
|
@ -9,6 +9,7 @@ use rand_core::OsRng;
|
|||
use serde::{Deserialize, Serialize};
|
||||
use specta::Type;
|
||||
use thiserror::Error;
|
||||
use zeroize::ZeroizeOnDrop;
|
||||
|
||||
pub const REMOTE_IDENTITY_LEN: usize = 32;
|
||||
|
||||
|
@ -22,8 +23,8 @@ pub enum IdentityErr {
|
|||
}
|
||||
|
||||
/// TODO
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Identity(ed25519_dalek::SigningKey); // TODO: Zeroize on this type
|
||||
#[derive(Debug, Clone, ZeroizeOnDrop)]
|
||||
pub struct Identity(ed25519_dalek::SigningKey);
|
||||
|
||||
impl PartialEq for Identity {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
|
|
Loading…
Reference in a new issue