This PR adds the Node script active_to_passive.js that converts a transcript of a live test into a collection of passive test vectors. The script takes two inputs: A config JSON file of the same format provided to test-runner, and a transcript JSON file of the format output by test-runner (thus node active-to-passive.js config.json transcript.json).
For each test case (combination of clients / encryption / ciphersuite), and for each client that joins via Welcome in that test case, the script emits a passive test vector that covers:
The Welcome that adds the client to the group
Further commits that the client is instructed to handle in the test script
... until the first time the client emits a message (since it is no longer passive)
For example, consider the following case:
Alice creates a group
Alice adds Bob to the group
Alice adds Charlie to the group
Alice sends an empty Commit
Bob sends an empty Commit
Charlie sends an empty Commit
This would lead to two test vectors, from Bob's and Charlie's perspectives. Bob's test vector would cover steps [2, 3, 4] and Charlie's test vector would cover steps [3, 4, 5].
I have verified that the overall flow works, with the following steps:
Running the config.json file in there repository with MLSpp as the sole client and collecting the output in transcript.json
This PR adds the Node script
active_to_passive.js
that converts a transcript of a live test into a collection of passive test vectors. The script takes two inputs: A config JSON file of the same format provided totest-runner
, and a transcript JSON file of the format output bytest-runner
(thusnode active-to-passive.js config.json transcript.json
).For each test case (combination of clients / encryption / ciphersuite), and for each client that joins via Welcome in that test case, the script emits a passive test vector that covers:
For example, consider the following case:
This would lead to two test vectors, from Bob's and Charlie's perspectives. Bob's test vector would cover steps
[2, 3, 4]
and Charlie's test vector would cover steps[3, 4, 5]
.I have verified that the overall flow works, with the following steps:
config.json
file in there repository with MLSpp as the sole client and collecting the output intranscript.json
node active_to_passive.js config.json transcript.json >passive.json
passive.json
as a passive client test vector