diff --git a/bramble-api/src/main/java/org/briarproject/bramble/api/transport/KeyManager.java b/bramble-api/src/main/java/org/briarproject/bramble/api/transport/KeyManager.java index 50f7d8aa0..086e46416 100644 --- a/bramble-api/src/main/java/org/briarproject/bramble/api/transport/KeyManager.java +++ b/bramble-api/src/main/java/org/briarproject/bramble/api/transport/KeyManager.java @@ -22,8 +22,23 @@ public interface KeyManager { /** * Derives and stores a set of rotation mode transport keys for - * communicating with the given contact over each transport and returns the - * key set IDs. + * communicating with the given contact over the given transport and + * returns the key set ID. + *
+ * {@link StreamContext StreamContexts} for the contact can be created + * after this method has returned. + * + * @param alice True if the local party is Alice + * @param active Whether the derived keys can be used for outgoing streams + */ + KeySetId addRotationKeys(Transaction txn, ContactId c, TransportId t, + SecretKey rootKey, long timestamp, boolean alice, + boolean active) throws DbException; + + /** + * Derives and stores a set of rotation mode transport keys for + * communicating with the given contact over each supported transport and + * returns the key set IDs. * * {@link StreamContext StreamContexts} for the contact can be created * after this method has returned. diff --git a/bramble-core/src/main/java/org/briarproject/bramble/transport/KeyManagerImpl.java b/bramble-core/src/main/java/org/briarproject/bramble/transport/KeyManagerImpl.java index 58aeb7cea..ded31ab50 100644 --- a/bramble-core/src/main/java/org/briarproject/bramble/transport/KeyManagerImpl.java +++ b/bramble-core/src/main/java/org/briarproject/bramble/transport/KeyManagerImpl.java @@ -101,9 +101,17 @@ class KeyManagerImpl implements KeyManager, Service, EventListener { } @Override - public Map