mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
Offer IDs no longer need to be calculated or echoed in requests.
The initiator flag in the transport protocol makes this unnecessary by linking the two sides of a stream-mode connection, making it impossible for an attacker to replay the responder's side of a different connection.
This commit is contained in:
@@ -25,7 +25,6 @@ import net.sf.briar.api.protocol.GroupId;
|
||||
import net.sf.briar.api.protocol.Message;
|
||||
import net.sf.briar.api.protocol.MessageId;
|
||||
import net.sf.briar.api.protocol.Offer;
|
||||
import net.sf.briar.api.protocol.OfferId;
|
||||
import net.sf.briar.api.protocol.SubscriptionUpdate;
|
||||
import net.sf.briar.api.protocol.TransportUpdate;
|
||||
import net.sf.briar.api.protocol.writers.AckWriter;
|
||||
@@ -50,7 +49,6 @@ public abstract class DatabaseComponentTest extends TestCase {
|
||||
protected final ContactId contactId;
|
||||
protected final GroupId groupId;
|
||||
protected final MessageId messageId, parentId;
|
||||
protected final OfferId offerId;
|
||||
private final long timestamp;
|
||||
private final int size;
|
||||
private final byte[] raw;
|
||||
@@ -67,7 +65,6 @@ public abstract class DatabaseComponentTest extends TestCase {
|
||||
groupId = new GroupId(TestUtils.getRandomId());
|
||||
messageId = new MessageId(TestUtils.getRandomId());
|
||||
parentId = new MessageId(TestUtils.getRandomId());
|
||||
offerId = new OfferId(TestUtils.getRandomId());
|
||||
timestamp = System.currentTimeMillis();
|
||||
size = 1234;
|
||||
raw = new byte[size];
|
||||
@@ -1036,9 +1033,7 @@ public abstract class DatabaseComponentTest extends TestCase {
|
||||
will(returnValue(true)); // Visible - do not request message # 1
|
||||
oneOf(database).setStatusSeenIfVisible(txn, contactId, messageId2);
|
||||
will(returnValue(false)); // Not visible - request message # 2
|
||||
oneOf(offer).getId();
|
||||
will(returnValue(offerId));
|
||||
oneOf(requestWriter).writeRequest(offerId, expectedRequest, 3);
|
||||
oneOf(requestWriter).writeRequest(expectedRequest, 3);
|
||||
}});
|
||||
DatabaseComponent db = createDatabaseComponent(database, cleaner);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user