mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Validate the decrypted IV before creating a reader/writer.
This commit is contained in:
@@ -5,8 +5,8 @@ import net.sf.briar.api.TransportId;
|
||||
|
||||
public interface BatchConnectionFactory {
|
||||
|
||||
void createIncomingConnection(ContactId c, BatchTransportReader r,
|
||||
byte[] encryptedIv);
|
||||
void createIncomingConnection(TransportId t, ContactId c,
|
||||
BatchTransportReader r, byte[] encryptedIv);
|
||||
|
||||
void createOutgoingConnection(TransportId t, ContactId c,
|
||||
BatchTransportWriter w);
|
||||
|
||||
@@ -6,9 +6,17 @@ import net.sf.briar.api.TransportId;
|
||||
|
||||
public interface ConnectionReaderFactory {
|
||||
|
||||
ConnectionReader createConnectionReader(InputStream in, byte[] encryptedIv,
|
||||
byte[] secret);
|
||||
/**
|
||||
* Creates a connection reader for a batch-mode connection or the
|
||||
* initiator's side of a stream-mode connection.
|
||||
*/
|
||||
ConnectionReader createConnectionReader(InputStream in, TransportId t,
|
||||
byte[] encryptedIv, byte[] secret);
|
||||
|
||||
ConnectionReader createConnectionReader(InputStream in, boolean initiator,
|
||||
TransportId t, long connection, byte[] secret);
|
||||
/**
|
||||
* Creates a connection reader for the responder's side of a stream-mode
|
||||
* connection.
|
||||
*/
|
||||
ConnectionReader createConnectionReader(InputStream in, TransportId t,
|
||||
long connection, byte[] secret);
|
||||
}
|
||||
|
||||
@@ -6,9 +6,17 @@ import net.sf.briar.api.TransportId;
|
||||
|
||||
public interface ConnectionWriterFactory {
|
||||
|
||||
/**
|
||||
* Creates a connection writer for a batch-mode connection or the
|
||||
* initiator's side of a stream-mode connection.
|
||||
*/
|
||||
ConnectionWriter createConnectionWriter(OutputStream out, long capacity,
|
||||
boolean initiator, TransportId t, long connection, byte[] secret);
|
||||
TransportId t, long connection, byte[] secret);
|
||||
|
||||
/**
|
||||
* Creates a connection writer for the responder's side of a stream-mode
|
||||
* connection.
|
||||
*/
|
||||
ConnectionWriter createConnectionWriter(OutputStream out, long capacity,
|
||||
TransportId t, byte[] encryptedIv, byte[] secret);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user