Merge pull request #2047 from matrix-org/travis/1.0/test-vectors

Fix test vectors with invalid JSON and signature
pull/977/head
Travis Ralston 5 years ago committed by GitHub
commit 4c82553df4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -91,11 +91,17 @@ Given the following minimally-sized event:
.. code:: json .. code:: json
{ {
"event_id": "$0:domain", "room_id": "!x:domain",
"sender": "@a:domain",
"origin": "domain", "origin": "domain",
"origin_server_ts": 1000000, "origin_server_ts": 1000000,
"signatures": {}, "signatures": {},
"hashes": {},
"type": "X", "type": "X",
"content": {},
"prev_events": [],
"auth_events": [],
"depth": 3,
"unsigned": { "unsigned": {
"age_ts": 1000000 "age_ts": 1000000
} }
@ -106,15 +112,20 @@ The event signing algorithm should emit the following signed event:
.. code:: json .. code:: json
{ {
"event_id": "$0:domain", "auth_events": [],
"content": {},
"depth": 3,
"hashes": { "hashes": {
"sha256": "6tJjLpXtggfke8UxFhAKg82QVkJzvKOVOOSjUDK4ZSI" "sha256": "5jM4wQpv6lnBo7CLIghJuHdW+s2CMBJPUOGOC89ncos"
}, },
"origin": "domain", "origin": "domain",
"origin_server_ts": 1000000, "origin_server_ts": 1000000,
"prev_events": [],
"room_id": "!x:domain",
"sender": "@a:domain",
"signatures": { "signatures": {
"domain": { "domain": {
"ed25519:1": "2Wptgo4CwmLo/Y8B8qinxApKaCkBG2fjTWB7AbP5Uy+aIbygsSdLOFzvdDjww8zUVKCmI02eP9xtyJxc/cLiBA" "ed25519:1": "KxwGjPSDEtvnFgU00fwFz+l6d2pJM6XBIaMEn81SXPTRl16AqLAYqfIReFGZlHi5KLjAWbOoMszkwsQma+lYAg"
} }
}, },
"type": "X", "type": "X",
@ -129,7 +140,7 @@ Given the following event containing redactable content:
{ {
"content": { "content": {
"body": "Here is the message content", "body": "Here is the message content"
}, },
"event_id": "$0:domain", "event_id": "$0:domain",
"origin": "domain", "origin": "domain",
@ -149,7 +160,7 @@ The event signing algorithm should emit the following signed event:
{ {
"content": { "content": {
"body": "Here is the message content", "body": "Here is the message content"
}, },
"event_id": "$0:domain", "event_id": "$0:domain",
"hashes": { "hashes": {

Loading…
Cancel
Save