Validate the decrypted IV before creating a reader/writer.

This commit is contained in:
akwizgran
2011-10-18 15:58:10 +01:00
parent 2f457162a5
commit d7a417f36d
18 changed files with 121 additions and 80 deletions

View File

@@ -49,8 +49,8 @@ class OutgoingBatchConnection {
byte[] secret = db.getSharedSecret(contactId);
long connection = db.getConnectionNumber(contactId, transportId);
ConnectionWriter conn = connFactory.createConnectionWriter(
writer.getOutputStream(), writer.getCapacity(), true,
transportId, connection, secret);
writer.getOutputStream(), writer.getCapacity(), transportId,
connection, secret);
OutputStream out = conn.getOutputStream();
// There should be enough space for a packet
long capacity = conn.getRemainingCapacity();