Add handshake keys to TransportKeyManagerImpl.

This commit is contained in:
akwizgran
2019-05-07 10:33:26 +01:00
parent 3f51ad6c07
commit 5adc9d8dbd
8 changed files with 180 additions and 111 deletions

View File

@@ -101,8 +101,8 @@ public class SyncIntegrationTest extends BrambleTestCase {
private byte[] write() throws Exception {
ByteArrayOutputStream out = new ByteArrayOutputStream();
StreamContext ctx = new StreamContext(contactId, transportId, tagKey,
headerKey, streamNumber);
StreamContext ctx = new StreamContext(contactId, null, transportId,
tagKey, headerKey, streamNumber, false);
StreamWriter streamWriter = streamWriterFactory.createStreamWriter(out,
ctx);
SyncRecordWriter recordWriter = recordWriterFactory.createRecordWriter(
@@ -131,8 +131,8 @@ public class SyncIntegrationTest extends BrambleTestCase {
assertArrayEquals(expectedTag, tag);
// Create the readers
StreamContext ctx = new StreamContext(contactId, transportId, tagKey,
headerKey, streamNumber);
StreamContext ctx = new StreamContext(contactId, null, transportId,
tagKey, headerKey, streamNumber, false);
InputStream streamReader = streamReaderFactory.createStreamReader(in,
ctx);
SyncRecordReader recordReader = recordReaderFactory.createRecordReader(

View File

@@ -47,7 +47,7 @@ public class KeyManagerImplTest extends BrambleMockTestCase {
private final TransportId transportId = getTransportId();
private final TransportId unknownTransportId = getTransportId();
private final StreamContext streamContext = new StreamContext(contactId,
transportId, getSecretKey(), getSecretKey(), 1);
null, transportId, getSecretKey(), getSecretKey(), 1, false);
private final byte[] tag = getRandomBytes(TAG_LENGTH);
private final Random random = new Random();