Fix encryption algorithm typos in tests/comments (#7637)

@uhoreg has confirmed these were both typos. They are only in comments and tests though, rather than anything critical.

Introduced in:

* https://github.com/matrix-org/synapse/pull/7157
* https://github.com/matrix-org/synapse/pull/5726
This commit is contained in:
Andrew Morgan 2020-06-04 20:03:40 +01:00 committed by GitHub
parent f8b9ead3ee
commit c389bfb6ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 10 deletions

1
changelog.d/7637.misc Normal file
View File

@ -0,0 +1 @@
Fix typos of `m.olm.curve25519-aes-sha2` and `m.megolm.v1.aes-sha2` in comments, test files.

View File

@ -42,7 +42,7 @@ class KeyUploadServlet(RestServlet):
"device_id": "<device_id>", "device_id": "<device_id>",
"valid_until_ts": <millisecond_timestamp>, "valid_until_ts": <millisecond_timestamp>,
"algorithms": [ "algorithms": [
"m.olm.curve25519-aes-sha256", "m.olm.curve25519-aes-sha2",
] ]
"keys": { "keys": {
"<algorithm>:<device_id>": "<key_base64>", "<algorithm>:<device_id>": "<key_base64>",
@ -124,7 +124,7 @@ class KeyQueryServlet(RestServlet):
"device_id": "<device_id>", // Duplicated to be signed "device_id": "<device_id>", // Duplicated to be signed
"valid_until_ts": <millisecond_timestamp>, "valid_until_ts": <millisecond_timestamp>,
"algorithms": [ // List of supported algorithms "algorithms": [ // List of supported algorithms
"m.olm.curve25519-aes-sha256", "m.olm.curve25519-aes-sha2",
], ],
"keys": { // Must include a ed25519 signing key "keys": { // Must include a ed25519 signing key
"<algorithm>:<key_id>": "<key_base64>", "<algorithm>:<key_id>": "<key_base64>",
@ -285,8 +285,8 @@ class SignaturesUploadServlet(RestServlet):
"user_id": "<user_id>", "user_id": "<user_id>",
"device_id": "<device_id>", "device_id": "<device_id>",
"algorithms": [ "algorithms": [
"m.olm.curve25519-aes-sha256", "m.olm.curve25519-aes-sha2",
"m.megolm.v1.aes-sha" "m.megolm.v1.aes-sha2"
], ],
"keys": { "keys": {
"<algorithm>:<device_id>": "<key_base64>", "<algorithm>:<device_id>": "<key_base64>",

View File

@ -536,7 +536,7 @@ def build_device_dict(user_id: str, device_id: str, sk: SigningKey):
return { return {
"user_id": user_id, "user_id": user_id,
"device_id": device_id, "device_id": device_id,
"algorithms": ["m.olm.curve25519-aes-sha256", "m.megolm.v1.aes-sha"], "algorithms": ["m.olm.curve25519-aes-sha2", "m.megolm.v1.aes-sha2"],
"keys": { "keys": {
"curve25519:" + device_id: "curve25519+key", "curve25519:" + device_id: "curve25519+key",
key_id(sk): encode_pubkey(sk), key_id(sk): encode_pubkey(sk),

View File

@ -222,7 +222,7 @@ class E2eKeysHandlerTestCase(unittest.TestCase):
device_key_1 = { device_key_1 = {
"user_id": local_user, "user_id": local_user,
"device_id": "abc", "device_id": "abc",
"algorithms": ["m.olm.curve25519-aes-sha256", "m.megolm.v1.aes-sha"], "algorithms": ["m.olm.curve25519-aes-sha2", "m.megolm.v1.aes-sha2"],
"keys": { "keys": {
"ed25519:abc": "base64+ed25519+key", "ed25519:abc": "base64+ed25519+key",
"curve25519:abc": "base64+curve25519+key", "curve25519:abc": "base64+curve25519+key",
@ -232,7 +232,7 @@ class E2eKeysHandlerTestCase(unittest.TestCase):
device_key_2 = { device_key_2 = {
"user_id": local_user, "user_id": local_user,
"device_id": "def", "device_id": "def",
"algorithms": ["m.olm.curve25519-aes-sha256", "m.megolm.v1.aes-sha"], "algorithms": ["m.olm.curve25519-aes-sha2", "m.megolm.v1.aes-sha2"],
"keys": { "keys": {
"ed25519:def": "base64+ed25519+key", "ed25519:def": "base64+ed25519+key",
"curve25519:def": "base64+curve25519+key", "curve25519:def": "base64+curve25519+key",
@ -315,7 +315,7 @@ class E2eKeysHandlerTestCase(unittest.TestCase):
device_key = { device_key = {
"user_id": local_user, "user_id": local_user,
"device_id": device_id, "device_id": device_id,
"algorithms": ["m.olm.curve25519-aes-sha256", "m.megolm.v1.aes-sha"], "algorithms": ["m.olm.curve25519-aes-sha2", "m.megolm.v1.aes-sha2"],
"keys": {"curve25519:xyz": "curve25519+key", "ed25519:xyz": device_pubkey}, "keys": {"curve25519:xyz": "curve25519+key", "ed25519:xyz": device_pubkey},
"signatures": {local_user: {"ed25519:xyz": "something"}}, "signatures": {local_user: {"ed25519:xyz": "something"}},
} }
@ -391,8 +391,8 @@ class E2eKeysHandlerTestCase(unittest.TestCase):
"user_id": local_user, "user_id": local_user,
"device_id": device_id, "device_id": device_id,
"algorithms": [ "algorithms": [
"m.olm.curve25519-aes-sha256", "m.olm.curve25519-aes-sha2",
"m.megolm.v1.aes-sha", "m.megolm.v1.aes-sha2",
], ],
"keys": { "keys": {
"curve25519:xyz": "curve25519+key", "curve25519:xyz": "curve25519+key",