Merge branch 'static-transport-keys' into 'master'

Add database support for pending contacts and handshake keys

See merge request briar/briar!1078
This commit is contained in:
Torsten Grote
2019-04-22 14:00:52 +00:00
56 changed files with 2588 additions and 727 deletions

View File

@@ -10,7 +10,7 @@ import org.briarproject.bramble.api.plugin.TransportId;
import org.briarproject.bramble.api.properties.TransportProperties;
import org.briarproject.bramble.api.sync.GroupId;
import org.briarproject.bramble.api.sync.MessageId;
import org.briarproject.bramble.api.transport.KeySetId;
import org.briarproject.bramble.api.transport.TransportKeySetId;
import org.briarproject.bramble.test.BrambleTestCase;
import org.briarproject.briar.api.client.SessionId;
import org.briarproject.briar.introduction.IntroducerSession.Introducee;
@@ -75,7 +75,8 @@ public class SessionEncoderParserIntegrationTest extends BrambleTestCase {
getTransportPropertiesMap(3);
private final Map<TransportId, TransportProperties>
remoteTransportProperties = getTransportPropertiesMap(3);
private final Map<TransportId, KeySetId> transportKeys = new HashMap<>();
private final Map<TransportId, TransportKeySetId> transportKeys =
new HashMap<>();
private final byte[] localMacKey = getRandomBytes(SecretKey.LENGTH);
private final byte[] remoteMacKey = getRandomBytes(SecretKey.LENGTH);
@@ -88,9 +89,9 @@ public class SessionEncoderParserIntegrationTest extends BrambleTestCase {
sessionParser = new SessionParserImpl(clientHelper);
author1 = getRealAuthor(authorFactory);
author2 = getRealAuthor(authorFactory);
transportKeys.put(getTransportId(), new KeySetId(1));
transportKeys.put(getTransportId(), new KeySetId(2));
transportKeys.put(getTransportId(), new KeySetId(3));
transportKeys.put(getTransportId(), new TransportKeySetId(1));
transportKeys.put(getTransportId(), new TransportKeySetId(2));
transportKeys.put(getTransportId(), new TransportKeySetId(3));
}
@Test

View File

@@ -56,7 +56,7 @@ public class SimplexMessagingIntegrationTest extends BriarTestCase {
private final File testDir = getTestDirectory();
private final File aliceDir = new File(testDir, "alice");
private final File bobDir = new File(testDir, "bob");
private final SecretKey master = getSecretKey();
private final SecretKey rootKey = getSecretKey();
private final long timestamp = System.currentTimeMillis();
private SimplexMessagingIntegrationTestComponent alice, bob;
@@ -110,7 +110,7 @@ public class SimplexMessagingIntegrationTest extends BriarTestCase {
lifecycleManager.waitForStartup();
// Add the other user as a contact
ContactManager contactManager = device.getContactManager();
return contactManager.addContact(remote, local.getId(), master,
return contactManager.addContact(remote, local.getId(), rootKey,
timestamp, alice, true, true);
}