aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/tests/harness/chat_send_probe.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/tests/harness/chat_send_probe.py')
-rw-r--r--packages/meshbay-hub/tests/harness/chat_send_probe.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/meshbay-hub/tests/harness/chat_send_probe.py b/packages/meshbay-hub/tests/harness/chat_send_probe.py
index 7569628..e7f1dae 100644
--- a/packages/meshbay-hub/tests/harness/chat_send_probe.py
+++ b/packages/meshbay-hub/tests/harness/chat_send_probe.py
@@ -171,7 +171,10 @@ function makeTransport(name, chatReply) {
tp._groupId = '__GROUP_ID__';
tp._gekRaw = hex('__GEK_HEX__');
tp.chatEpoch = 1;
- tp._sessionKeys = { skEdB64: SK_ED_B64 };
+ tp._identity = { pkEdB64: DEVICE_PK_B64,
+ signAs: (kind, fields) => window.MeshBayKeys.signBytes(SK_ED_B64,
+ window.MeshBayCrypto.transcriptFor(kind, fields,
+ { pkEdB64: DEVICE_PK_B64 })) };
tp.devicePk = DEVICE_PK_B64;
tp._send = (obj) => {
log.push('sent ' + obj.type);
@@ -314,7 +317,7 @@ async function runScenario(name, chatReply, duringSession) {
// connect() drops it before it touches the network. Nothing about this
// step is simulated, and the clear is not poked in by the test.
await tp.connect('node-1', 'token', tp._groupId, tp._gekRaw,
- tp._sessionKeys, null, 'me', 'user-me').then(
+ tp._identity, null, 'me', 'user-me').then(
() => log.push('reconnect: connect() unexpectedly succeeded'),
(e) => log.push('reconnect: connect() stopped at signaling, as expected: '
+ (e && e.message || e)));