Skip to content

Commit

Permalink
refactor: Remove Debug implementations for the libolm compat structs
Browse files Browse the repository at this point in the history
These structs contain private key material so they shouldn't have Debug
implementations, even unused ones.
  • Loading branch information
poljar committed Sep 19, 2024
1 parent 266a388 commit 1f8ee9a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/olm/account/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ mod libolm {
Curve25519PublicKey, Ed25519Keypair, KeyId,
};

#[derive(Debug, Encode, Decode, Zeroize, ZeroizeOnDrop)]
#[derive(Encode, Decode, Zeroize, ZeroizeOnDrop)]
struct OneTimeKey {
key_id: u32,
published: bool,
Expand All @@ -509,7 +509,7 @@ mod libolm {
}
}

#[derive(Debug, Zeroize, ZeroizeOnDrop)]
#[derive(Zeroize, ZeroizeOnDrop)]
struct FallbackKeysArray {
fallback_key: Option<OneTimeKey>,
previous_fallback_key: Option<OneTimeKey>,
Expand Down
6 changes: 3 additions & 3 deletions src/olm/session/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ mod libolm_compat {
Curve25519PublicKey,
};

#[derive(Debug, Decode, Zeroize, ZeroizeOnDrop)]
#[derive(Decode, Zeroize, ZeroizeOnDrop)]
struct SenderChain {
public_ratchet_key: [u8; 32],
#[secret]
Expand All @@ -362,7 +362,7 @@ mod libolm_compat {
chain_key_index: u32,
}

#[derive(Debug, Decode, Zeroize, ZeroizeOnDrop)]
#[derive(Decode, Zeroize, ZeroizeOnDrop)]
struct ReceivingChain {
public_ratchet_key: [u8; 32],
#[secret]
Expand All @@ -382,7 +382,7 @@ mod libolm_compat {
}
}

#[derive(Debug, Decode, Zeroize, ZeroizeOnDrop)]
#[derive(Decode, Zeroize, ZeroizeOnDrop)]
struct MessageKey {
ratchet_key: [u8; 32],
#[secret]
Expand Down

0 comments on commit 1f8ee9a

Please sign in to comment.