Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit c389bfb

Browse files
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: * #7157 * #5726
1 parent f8b9ead commit c389bfb

4 files changed

Lines changed: 11 additions & 10 deletions

File tree

changelog.d/7637.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix typos of `m.olm.curve25519-aes-sha2` and `m.megolm.v1.aes-sha2` in comments, test files.

synapse/rest/client/v2_alpha/keys.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class KeyUploadServlet(RestServlet):
4242
"device_id": "<device_id>",
4343
"valid_until_ts": <millisecond_timestamp>,
4444
"algorithms": [
45-
"m.olm.curve25519-aes-sha256",
45+
"m.olm.curve25519-aes-sha2",
4646
]
4747
"keys": {
4848
"<algorithm>:<device_id>": "<key_base64>",
@@ -124,7 +124,7 @@ class KeyQueryServlet(RestServlet):
124124
"device_id": "<device_id>", // Duplicated to be signed
125125
"valid_until_ts": <millisecond_timestamp>,
126126
"algorithms": [ // List of supported algorithms
127-
"m.olm.curve25519-aes-sha256",
127+
"m.olm.curve25519-aes-sha2",
128128
],
129129
"keys": { // Must include a ed25519 signing key
130130
"<algorithm>:<key_id>": "<key_base64>",
@@ -285,8 +285,8 @@ class SignaturesUploadServlet(RestServlet):
285285
"user_id": "<user_id>",
286286
"device_id": "<device_id>",
287287
"algorithms": [
288-
"m.olm.curve25519-aes-sha256",
289-
"m.megolm.v1.aes-sha"
288+
"m.olm.curve25519-aes-sha2",
289+
"m.megolm.v1.aes-sha2"
290290
],
291291
"keys": {
292292
"<algorithm>:<device_id>": "<key_base64>",

tests/federation/test_federation_sender.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ def build_device_dict(user_id: str, device_id: str, sk: SigningKey):
536536
return {
537537
"user_id": user_id,
538538
"device_id": device_id,
539-
"algorithms": ["m.olm.curve25519-aes-sha256", "m.megolm.v1.aes-sha"],
539+
"algorithms": ["m.olm.curve25519-aes-sha2", "m.megolm.v1.aes-sha2"],
540540
"keys": {
541541
"curve25519:" + device_id: "curve25519+key",
542542
key_id(sk): encode_pubkey(sk),

tests/handlers/test_e2e_keys.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def test_reupload_signatures(self):
222222
device_key_1 = {
223223
"user_id": local_user,
224224
"device_id": "abc",
225-
"algorithms": ["m.olm.curve25519-aes-sha256", "m.megolm.v1.aes-sha"],
225+
"algorithms": ["m.olm.curve25519-aes-sha2", "m.megolm.v1.aes-sha2"],
226226
"keys": {
227227
"ed25519:abc": "base64+ed25519+key",
228228
"curve25519:abc": "base64+curve25519+key",
@@ -232,7 +232,7 @@ def test_reupload_signatures(self):
232232
device_key_2 = {
233233
"user_id": local_user,
234234
"device_id": "def",
235-
"algorithms": ["m.olm.curve25519-aes-sha256", "m.megolm.v1.aes-sha"],
235+
"algorithms": ["m.olm.curve25519-aes-sha2", "m.megolm.v1.aes-sha2"],
236236
"keys": {
237237
"ed25519:def": "base64+ed25519+key",
238238
"curve25519:def": "base64+curve25519+key",
@@ -315,7 +315,7 @@ def test_upload_signatures(self):
315315
device_key = {
316316
"user_id": local_user,
317317
"device_id": device_id,
318-
"algorithms": ["m.olm.curve25519-aes-sha256", "m.megolm.v1.aes-sha"],
318+
"algorithms": ["m.olm.curve25519-aes-sha2", "m.megolm.v1.aes-sha2"],
319319
"keys": {"curve25519:xyz": "curve25519+key", "ed25519:xyz": device_pubkey},
320320
"signatures": {local_user: {"ed25519:xyz": "something"}},
321321
}
@@ -391,8 +391,8 @@ def test_upload_signatures(self):
391391
"user_id": local_user,
392392
"device_id": device_id,
393393
"algorithms": [
394-
"m.olm.curve25519-aes-sha256",
395-
"m.megolm.v1.aes-sha",
394+
"m.olm.curve25519-aes-sha2",
395+
"m.megolm.v1.aes-sha2",
396396
],
397397
"keys": {
398398
"curve25519:xyz": "curve25519+key",

0 commit comments

Comments
 (0)