Skip to content

Commit

Permalink
[signalapp#472] remove Debug from SessionRecord
Browse files Browse the repository at this point in the history
- also add a cheap Debug impl for PrivateKey which leaks no info
  • Loading branch information
cosmicexplorer committed Sep 9, 2022
1 parent ab29fed commit 5bd9a14
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions rust/protocol/src/curve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,12 @@ impl TryFrom<&[u8]> for PrivateKey {
}
}

impl fmt::Debug for PrivateKey {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "PrivateKey {{ key_type={} }}", self.key_type())
}
}

#[derive(Copy, Clone)]
pub struct KeyPair {
pub public_key: PublicKey,
Expand Down
2 changes: 1 addition & 1 deletion rust/protocol/src/state/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ impl From<&SessionState> for SessionStructure {
}
}

#[derive(Clone, Debug)]
#[derive(Clone)]
pub struct SessionRecord {
current_session: Option<SessionState>,
previous_sessions: Vec<Vec<u8>>,
Expand Down

0 comments on commit 5bd9a14

Please sign in to comment.