File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change 11use std:: sync:: Arc ;
22
33use openmls:: prelude:: { SignaturePublicKey , SignatureScheme } ;
4- use openmls_traits:: OpenMlsCryptoProvider as _;
54
65use super :: { Error , Result } ;
76use crate :: {
@@ -143,16 +142,7 @@ impl Session {
143142 }
144143
145144 // remove any key packages generated by this credential
146- let keypackages = self . find_all_keypackages ( & self . crypto_provider . keystore ( ) ) . await ?;
147- let keypackages_from_this_credential = keypackages. iter ( ) . filter_map ( |( _stored_key_package, key_package) | {
148- credentials
149- . iter ( )
150- . any ( |credential| key_package. leaf_node ( ) . credential ( ) == credential. mls_credential ( ) )
151- // if computing the hash reference fails, we will just not delete the key package
152- . then ( || key_package. hash_ref ( self . crypto_provider . crypto ( ) ) . ok ( ) ) . flatten ( )
153- } ) ;
154- self . prune_keypackages ( & self . crypto_provider , keypackages_from_this_credential)
155- . await ?;
145+ self . remove_keypackages_for ( credential_ref) . await ?;
156146
157147 // remove all credentials associated with this ref
158148 // only remove the actual credential after the keypackages are all gone,
You can’t perform that action at this time.
0 commit comments