Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions openmls/src/group/core_group/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ impl Member {
}
}

#[derive(Debug, Serialize, Deserialize)]
#[cfg_attr(test, derive(PartialEq, Clone))]
#[derive(Debug, Serialize, Deserialize, Clone)]
#[cfg_attr(test, derive(PartialEq))]
pub(crate) struct CoreGroup {
public_group: PublicGroup,
group_epoch_secrets: GroupEpochSecrets,
Expand Down
8 changes: 4 additions & 4 deletions openmls/src/group/core_group/past_secrets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use crate::schedule::message_secrets::MessageSecrets;
use super::*;

// Internal helper struct
#[derive(Serialize, Deserialize)]
#[cfg_attr(test, derive(PartialEq, Clone))]
#[derive(Serialize, Deserialize, Clone)]
#[cfg_attr(test, derive(PartialEq))]
#[cfg_attr(feature = "crypto-debug", derive(Debug))]
struct EpochTree {
epoch: u64,
Expand All @@ -16,8 +16,8 @@ struct EpochTree {

/// Can store message secrets for up to `max_epochs`. The trees are added with [`self::add()`] and can be queried
/// with [`Self::get_epoch()`].
#[derive(Serialize, Deserialize)]
#[cfg_attr(test, derive(PartialEq, Clone))]
#[derive(Serialize, Deserialize, Clone)]
#[cfg_attr(test, derive(PartialEq,))]
#[cfg_attr(feature = "crypto-debug", derive(Debug))]
pub(crate) struct MessageSecretsStore {
// Maximum size of the `past_epoch_trees` list.
Expand Down
3 changes: 1 addition & 2 deletions openmls/src/group/core_group/proposals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ use crate::{

/// A [ProposalStore] can store the standalone proposals that are received from the DS
/// in between two commit messages.
#[derive(Debug, Default, Serialize, Deserialize, PartialEq)]
#[cfg_attr(test, derive(Clone))]
#[derive(Debug, Default, Serialize, Deserialize, PartialEq, Clone)]
pub struct ProposalStore {
queued_proposals: Vec<QueuedProposal>,
}
Expand Down
6 changes: 3 additions & 3 deletions openmls/src/group/mls_group/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ mod test_mls_group;

/// Pending Commit state. Differentiates between Commits issued by group members
/// and External Commits.
#[derive(Debug, Serialize, Deserialize)]
#[derive(Debug, Serialize, Deserialize, Clone)]
pub enum PendingCommitState {
/// Commit from a group member
Member(StagedCommit),
Expand Down Expand Up @@ -117,7 +117,7 @@ impl From<PendingCommitState> for StagedCommit {
/// state to [`MlsGroupState::PendingCommit`]. For more information on the
/// external commit process, see [`MlsGroup::join_by_external_commit()`] or
/// Section 11.2.1 of the MLS specification.
#[derive(Debug, Serialize, Deserialize)]
#[derive(Debug, Serialize, Deserialize, Clone)]
pub enum MlsGroupState {
/// There is currently a pending Commit that hasn't been merged yet.
PendingCommit(Box<PendingCommitState>),
Expand Down Expand Up @@ -151,7 +151,7 @@ pub enum MlsGroupState {
/// An `MlsGroup` has an internal state variable determining if it is active or
/// inactive, as well as if it has a pending commit. See [`MlsGroupState`] for
/// more information.
#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct MlsGroup {
// The group configuration. See `MlsGroupCongig` for more information.
mls_group_config: MlsGroupConfig,
Expand Down
4 changes: 2 additions & 2 deletions openmls/src/group/public_group/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ mod tests;
mod validation;

/// This struct holds all public values of an MLS group.
#[derive(Debug, Serialize, Deserialize)]
#[cfg_attr(test, derive(PartialEq, Clone))]
#[derive(Debug, Serialize, Deserialize, Clone)]
#[cfg_attr(test, derive(PartialEq))]
pub struct PublicGroup {
treesync: TreeSync,
proposal_store: ProposalStore,
Expand Down
4 changes: 2 additions & 2 deletions openmls/src/schedule/psk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,8 @@ pub mod store {
/// Resumption PSK store.
///
/// This is where the resumption PSKs are kept in a rollover list.
#[derive(Debug, Serialize, Deserialize)]
#[cfg_attr(test, derive(PartialEq, Clone))]
#[derive(Debug, Serialize, Deserialize, Clone)]
#[cfg_attr(test, derive(PartialEq))]
pub(crate) struct ResumptionPskStore {
max_number_of_secrets: usize,
resumption_psk: Vec<(GroupEpoch, ResumptionPskSecret)>,
Expand Down
4 changes: 2 additions & 2 deletions openmls/src/treesync/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,8 @@ impl std::fmt::Display for RatchetTree {
/// [`TreeSync`] instance guarantee a few invariants that are checked upon
/// creating a new instance from an imported set of nodes, as well as when
/// merging a diff.
#[derive(Debug, Serialize, Deserialize)]
#[cfg_attr(test, derive(PartialEq, Clone))]
#[derive(Debug, Serialize, Deserialize, Clone)]
#[cfg_attr(test, derive(PartialEq))]
pub(crate) struct TreeSync {
tree: MlsBinaryTree<TreeSyncLeafNode, TreeSyncParentNode>,
tree_hash: Vec<u8>,
Expand Down
Loading