diff --git a/fixtures/protocol/v1/control/handshake.json b/fixtures/protocol/v1/control/handshake.json new file mode 100644 index 0000000..acc2df7 --- /dev/null +++ b/fixtures/protocol/v1/control/handshake.json @@ -0,0 +1,73 @@ +{ + "name": "control-handshake", + "cases": [ + { + "name": "accept-first-handshake-step", + "operation": "parseControlFrame", + "input": { + "v": 1, + "id": "0198abc4-0001-7abc-8123-123456789abc", + "type": "secure.handshake", + "timestamp": 1786000000000, + "payload": { + "connectionId": "0198abc4-1001-7abc-8123-123456789abc", + "targetDeviceId": "0198abc4-2001-7abc-8123-123456789abc", + "step": 1, + "data": "AQIDBA" + } + }, + "expect": { "accepted": true } + }, + { + "name": "accept-second-handshake-step", + "operation": "parseControlFrame", + "input": { + "v": 1, + "id": "0198abc4-0002-7abc-8123-123456789abc", + "type": "secure.handshake", + "timestamp": 1786000000000, + "payload": { + "connectionId": "0198abc4-1001-7abc-8123-123456789abc", + "targetDeviceId": "0198abc4-2001-7abc-8123-123456789abc", + "step": 2, + "data": "AQIDBA" + } + }, + "expect": { "accepted": true } + }, + { + "name": "reject-third-handshake-step", + "operation": "parseControlFrame", + "input": { + "v": 1, + "id": "0198abc4-0003-7abc-8123-123456789abc", + "type": "secure.handshake", + "timestamp": 1786000000000, + "payload": { + "connectionId": "0198abc4-1001-7abc-8123-123456789abc", + "targetDeviceId": "0198abc4-2001-7abc-8123-123456789abc", + "step": 3, + "data": "AQIDBA" + } + }, + "expect": { "accepted": false } + }, + { + "name": "reject-handshake-data-with-nonzero-unused-bits", + "operation": "parseControlFrame", + "input": { + "v": 1, + "id": "0198abc4-0004-7abc-8123-123456789abc", + "type": "secure.handshake", + "timestamp": 1786000000000, + "payload": { + "connectionId": "0198abc4-1001-7abc-8123-123456789abc", + "targetDeviceId": "0198abc4-2001-7abc-8123-123456789abc", + "step": 1, + "data": "AQIDBB" + } + }, + "expect": { "accepted": false } + } + ] +}