Tunnels: Prop. 157 updates

- remove ITBM
- remove plaintext slot from OTBRM
This commit is contained in:
zzz
2021-07-13 09:47:30 -04:00
parent 8710aa0065
commit 617fff175e
5 changed files with 9 additions and 294 deletions

View File

@@ -158,6 +158,7 @@ public class BuildMessageTestStandalone extends TestCase {
for (int j = 0; j < TunnelBuildMessage.MAX_RECORD_COUNT; j++) {
if (msg.getRecord(j) == null) {
ourSlot = j;
msg.setRecord(j, reply);
break;
}
}
@@ -198,21 +199,8 @@ public class BuildMessageTestStandalone extends TestCase {
TunnelBuildReplyMessage reply;
if (testType == 3) {
OutboundTunnelBuildReplyMessage otbrm = new OutboundTunnelBuildReplyMessage(ctx, TunnelBuildMessage.MAX_RECORD_COUNT);
int ibep = _peers.length - 1;
int ibepSlot = -1;
for (int i = 0; i < order.size(); i++) {
int slot = order.get(i).intValue();
if (slot == ibep) {
ibepSlot = i;
break;
}
}
log.debug("OTBRM plaintext slot is " + ibepSlot);
for (int i = 0; i < TunnelBuildMessage.MAX_RECORD_COUNT; i++) {
if (i == ibepSlot)
otbrm.setPlaintextRecord(i, 0);
else
otbrm.setRecord(i, msg.getRecord(i));
otbrm.setRecord(i, msg.getRecord(i));
}
// test read/write
byte[] data = otbrm.toByteArray();