diff --git a/interop_client/src/main.rs b/interop_client/src/main.rs index 7b073c1e57..cb1a23579d 100644 --- a/interop_client/src/main.rs +++ b/interop_client/src/main.rs @@ -401,7 +401,11 @@ impl MlsClient for MlsClientImpl { // Store keys so OpenMLS can find them. crypto_provider .key_store() - .store(my_key_package.hpke_init_key().as_slice(), &private_key, None) + .store( + my_key_package.hpke_init_key().as_slice(), + &private_key, + None, + ) .map_err(|_| Status::aborted("failed to interact with the key store"))?; // Store the key package in the key store with the hash reference as id @@ -425,7 +429,11 @@ impl MlsClient for MlsClientImpl { // The key is the public key. crypto_provider .key_store() - .store::(my_key_package.hpke_init_key().as_slice(), &private_key, None) + .store::( + my_key_package.hpke_init_key().as_slice(), + &private_key, + None, + ) .map_err(into_status)?; let welcome_msg = MlsMessageIn::tls_deserialize(&mut request.welcome.as_slice()) diff --git a/openmls/src/key_packages/mod.rs b/openmls/src/key_packages/mod.rs index 2be54cbcfb..cfa8903fe8 100644 --- a/openmls/src/key_packages/mod.rs +++ b/openmls/src/key_packages/mod.rs @@ -669,7 +669,11 @@ impl KeyPackageBuilder { // The key is the public key. provider .key_store() - .store::(key_package.hpke_init_key().as_slice(), &init_private_key, expiration) + .store::( + key_package.hpke_init_key().as_slice(), + &init_private_key, + expiration, + ) .map_err(KeyPackageNewError::KeyStoreError)?; Ok(key_package) diff --git a/openmls/src/treesync/node/encryption_keys.rs b/openmls/src/treesync/node/encryption_keys.rs index 4563e02827..76f7d3e381 100644 --- a/openmls/src/treesync/node/encryption_keys.rs +++ b/openmls/src/treesync/node/encryption_keys.rs @@ -240,7 +240,9 @@ pub mod test_utils { pub fn write_keys_from_key_store(provider: &impl OpenMlsProvider, encryption_key: HpkeKeyPair) { let keypair = EncryptionKeyPair::from(encryption_key); - keypair.write_to_key_store(provider.key_store(), None).unwrap(); + keypair + .write_to_key_store(provider.key_store(), None) + .unwrap(); } } diff --git a/traits/src/key_store.rs b/traits/src/key_store.rs index 1b6a196a2b..b903fe5320 100644 --- a/traits/src/key_store.rs +++ b/traits/src/key_store.rs @@ -34,7 +34,12 @@ pub trait OpenMlsKeyStore { /// serialization for ID `k`. /// /// Returns an error if storing fails. - fn store(&self, k: &[u8], v: &V, expiration: Option) -> Result<(), Self::Error> + fn store( + &self, + k: &[u8], + v: &V, + expiration: Option, + ) -> Result<(), Self::Error> where Self: Sized;