Ignore expected IVs that arrive by the wrong transport.

This prevents an attacker from replaying connections to test whether a
transport endpoint has the same owner as an endpoint on another
transport (eg probing a Bluetooth device to see whether it has the
same owner as a given internet host).
This commit is contained in:
akwizgran
2011-11-17 09:24:28 +00:00
parent 13ebd369e2
commit 66d973bcdd
5 changed files with 44 additions and 31 deletions

View File

@@ -1,6 +1,7 @@
package net.sf.briar.api.transport;
import net.sf.briar.api.db.DbException;
import net.sf.briar.api.protocol.TransportId;
/**
* Maintains the connection reordering windows and decides whether incoming
@@ -12,5 +13,6 @@ public interface ConnectionRecogniser {
* Returns the connection's context if the connection should be accepted,
* or null if the connection should be rejected.
*/
ConnectionContext acceptConnection(byte[] encryptedIv) throws DbException;
ConnectionContext acceptConnection(TransportId t, byte[] encryptedIv)
throws DbException;
}