From 2099308d4cf1b733b88976f535590932f9b0eafb Mon Sep 17 00:00:00 2001 From: manuroe Date: Wed, 6 Feb 2019 11:50:47 +0100 Subject: [PATCH] Key backup: add `PUT /room_keys/version/{version}` to allow matrix clients to add signatures to an existing backup --- .../1219-storing-megolm-keys-serverside.md | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/proposals/1219-storing-megolm-keys-serverside.md b/proposals/1219-storing-megolm-keys-serverside.md index 4d8e8f1c..ae361d3a 100644 --- a/proposals/1219-storing-megolm-keys-serverside.md +++ b/proposals/1219-storing-megolm-keys-serverside.md @@ -177,6 +177,42 @@ Error codes: - `M_NOT_FOUND`: No backup version has been created. +##### `PUT /room_keys/version/{version}` + +Update information about the given version, or the current version if `{version}` +is omitted. Only `auth_data` can be updated. + +Body parameters: + +- `algorithm` (string): Optional. Must be the same as in the body parameters for `GET + /room_keys/version`. +- `auth_data` (object): Required. algorithm-dependent data. For + `m.megolm_backup.v1.curve25519-aes-sha2`, see below for the definition of + this property. +- `version` (string): Optional. The backup version. Must be the same as the query parameter or must be the current version. + +Example: + +```javascript +{ + "auth_data": { + "public_key": "abcdefg", + "signatures": { + "something": { + "ed25519:something": "hijklmnop" + "ed25519:anotherthing": "abcdef" + } + } + } +} +``` + +On success, returns the empty JSON object. + +Error codes: + +- `M_NOT_FOUND`: No backup version found. + #### Storing keys ##### `PUT /room_keys/keys/${roomId}/${sessionId}?version=$v`