Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
beltram committed Sep 14, 2023
1 parent d7dce55 commit c879148
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
9 changes: 9 additions & 0 deletions openmls/src/group/mls_group/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,15 @@ impl MlsGroupConfigBuilder {
self
}

/// Sets the group creator's required capabilities
pub fn required_capabilities(
mut self,
required_capabilities: RequiredCapabilitiesExtension,
) -> Self {
self.config.required_capabilities = required_capabilities;
self
}

/// Finalizes the builder and retursn an `[MlsGroupConfig`].
pub fn build(self) -> MlsGroupConfig {
self.config
Expand Down
2 changes: 1 addition & 1 deletion openmls/src/treesync/node/leaf_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ impl LeafNode {
}

/// Return a reference to [`Capabilities`].
pub(crate) fn capabilities(&self) -> &Capabilities {
pub fn capabilities(&self) -> &Capabilities {
&self.payload.capabilities
}

Expand Down
8 changes: 8 additions & 0 deletions traits/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,14 @@ impl From<Ciphersuite> for VerifiableCiphersuite {
}
}

impl TryFrom<VerifiableCiphersuite> for Ciphersuite {
type Error = tls_codec::Error;

fn try_from(value: VerifiableCiphersuite) -> Result<Self, Self::Error> {
value.0.try_into()
}
}

/// MLS ciphersuites.
#[allow(non_camel_case_types)]
#[allow(clippy::upper_case_acronyms)]
Expand Down

0 comments on commit c879148

Please sign in to comment.