From d817e3d29269759bba854a8dda1ef2b2af94d381 Mon Sep 17 00:00:00 2001 From: beltram Date: Fri, 15 Sep 2023 13:27:19 +0200 Subject: [PATCH] wip --- openmls/src/treesync/node/leaf_node.rs | 5 +++++ openmls/src/treesync/node/leaf_node/capabilities.rs | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/openmls/src/treesync/node/leaf_node.rs b/openmls/src/treesync/node/leaf_node.rs index 21e9e8279f..54334d9cae 100644 --- a/openmls/src/treesync/node/leaf_node.rs +++ b/openmls/src/treesync/node/leaf_node.rs @@ -262,6 +262,11 @@ impl LeafNode { leaf_node_tbs.payload.credential = leaf_node.credential().clone(); leaf_node_tbs.payload.signature_key = leaf_node.signature_key().clone(); leaf_node_tbs.payload.encryption_key = leaf_node.encryption_key().clone(); + + // The application MAY specify other changes to the leaf node, e.g. [..] updated capabilities, or different extensions + // cf https://www.rfc-editor.org/rfc/rfc9420.html#section-7.5-7 + leaf_node_tbs.payload.capabilities = leaf_node.capabilities().clone(); + leaf_node_tbs.payload.extensions = leaf_node.extensions().clone(); } else if let Some(new_encryption_key) = new_encryption_key { leaf_node_tbs.payload.encryption_key = new_encryption_key; } else { diff --git a/openmls/src/treesync/node/leaf_node/capabilities.rs b/openmls/src/treesync/node/leaf_node/capabilities.rs index 4e8bb445a6..73970981a1 100644 --- a/openmls/src/treesync/node/leaf_node/capabilities.rs +++ b/openmls/src/treesync/node/leaf_node/capabilities.rs @@ -27,11 +27,11 @@ use crate::{ Debug, Clone, PartialEq, Eq, Serialize, Deserialize, TlsSerialize, TlsDeserialize, TlsSize, )] pub struct Capabilities { - pub(super) versions: Vec, - pub(super) ciphersuites: Vec, - pub(super) extensions: Vec, - pub(super) proposals: Vec, - pub(super) credentials: Vec, + pub versions: Vec, + pub ciphersuites: Vec, + pub extensions: Vec, + pub proposals: Vec, + pub credentials: Vec, } impl Capabilities {