From e6d78ba918e6bdd719690dc54cb9ba0a42d61a05 Mon Sep 17 00:00:00 2001 From: cameronvoell Date: Thu, 4 Apr 2024 07:18:30 -0700 Subject: [PATCH] temporary comment for testing --- openmls/src/group/public_group/validation.rs | 74 ++++++++++---------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/openmls/src/group/public_group/validation.rs b/openmls/src/group/public_group/validation.rs index 039ded3d28..d8057af516 100644 --- a/openmls/src/group/public_group/validation.rs +++ b/openmls/src/group/public_group/validation.rs @@ -304,43 +304,43 @@ impl PublicGroup { return Err(ProposalValidationError::InsufficientCapabilities); } - // If there is a required capabilities extension, check if that one - // is supported. - if let Some(required_capabilities) = - self.group_context().extensions().required_capabilities() - { - // Check if all required capabilities are supported. - capabilities - .supports_required_capabilities(required_capabilities) - .map_err(|_| ProposalValidationError::InsufficientCapabilities)?; - } - - // Check that all extensions are contained in the capabilities. - if !capabilities.contain_extensions(leaf_node.extensions()) { - return Err(ProposalValidationError::InsufficientCapabilities); - } - - // Check that the capabilities contain the leaf node's credential type. - if !capabilities.contains_credential(&leaf_node.credential().credential_type()) { - return Err(ProposalValidationError::InsufficientCapabilities); - } - - // Check that the credential type is supported by all members of the group. - if !group_leaf_nodes.all(|node| { - node.capabilities() - .contains_credential(&leaf_node.credential().credential_type()) - }) { - return Err(ProposalValidationError::InsufficientCapabilities); - } - - // Check that the capabilities field of this LeafNode indicates - // support for all the credential types currently in use by other - // members. - if !group_leaf_nodes - .all(|node| capabilities.contains_credential(&node.credential().credential_type())) - { - return Err(ProposalValidationError::InsufficientCapabilities); - } + // // If there is a required capabilities extension, check if that one + // // is supported. + // if let Some(required_capabilities) = + // self.group_context().extensions().required_capabilities() + // { + // // Check if all required capabilities are supported. + // capabilities + // .supports_required_capabilities(required_capabilities) + // .map_err(|_| ProposalValidationError::InsufficientCapabilities)?; + // } + + // // Check that all extensions are contained in the capabilities. + // if !capabilities.contain_extensions(leaf_node.extensions()) { + // return Err(ProposalValidationError::InsufficientCapabilities); + // } + + // // Check that the capabilities contain the leaf node's credential type. + // if !capabilities.contains_credential(&leaf_node.credential().credential_type()) { + // return Err(ProposalValidationError::InsufficientCapabilities); + // } + + // // Check that the credential type is supported by all members of the group. + // if !group_leaf_nodes.all(|node| { + // node.capabilities() + // .contains_credential(&leaf_node.credential().credential_type()) + // }) { + // return Err(ProposalValidationError::InsufficientCapabilities); + // } + + // // Check that the capabilities field of this LeafNode indicates + // // support for all the credential types currently in use by other + // // members. + // if !group_leaf_nodes + // .all(|node| capabilities.contains_credential(&node.credential().credential_type())) + // { + // return Err(ProposalValidationError::InsufficientCapabilities); + // } } Ok(()) }