Use the same maximum frame length for all transports.

This commit is contained in:
akwizgran
2015-01-05 16:24:44 +00:00
parent 358166bc12
commit d3bf2d59a1
60 changed files with 194 additions and 321 deletions

View File

@@ -128,16 +128,15 @@ class AliceConnector extends Connector {
// Confirmation succeeded - upgrade to a secure connection
if(LOG.isLoggable(INFO))
LOG.info(pluginName + " confirmation succeeded");
int maxFrameLength = conn.getReader().getMaxFrameLength();
// Create the readers
InputStream streamReader =
streamReaderFactory.createInvitationStreamReader(in,
maxFrameLength, secret, false); // Bob's stream
secret, false); // Bob's stream
r = readerFactory.createReader(streamReader);
// Create the writers
OutputStream streamWriter =
streamWriterFactory.createInvitationStreamWriter(out,
maxFrameLength, secret, true); // Alice's stream
secret, true); // Alice's stream
w = writerFactory.createWriter(streamWriter);
// Derive the invitation nonces
byte[][] nonces = crypto.deriveInvitationNonces(secret);

View File

@@ -128,16 +128,15 @@ class BobConnector extends Connector {
// Confirmation succeeded - upgrade to a secure connection
if(LOG.isLoggable(INFO))
LOG.info(pluginName + " confirmation succeeded");
int maxFrameLength = conn.getReader().getMaxFrameLength();
// Create the readers
InputStream streamReader =
streamReaderFactory.createInvitationStreamReader(in,
maxFrameLength, secret, true); // Alice's stream
secret, true); // Alice's stream
r = readerFactory.createReader(streamReader);
// Create the writers
OutputStream streamWriter =
streamWriterFactory.createInvitationStreamWriter(out,
maxFrameLength, secret, false); // Bob's stream
secret, false); // Bob's stream
w = writerFactory.createWriter(streamWriter);
// Derive the nonces
byte[][] nonces = crypto.deriveInvitationNonces(secret);