Retrieve cross-signing keys sorta

This commit is contained in:
Neil Alexander 2021-07-28 15:52:52 +01:00
parent 44d022a385
commit a6bb3fd0ac
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
7 changed files with 132 additions and 3 deletions

View file

@ -40,6 +40,8 @@ type KeyInternalAPI interface {
QueryDeviceMessages(ctx context.Context, req *QueryDeviceMessagesRequest, res *QueryDeviceMessagesResponse)
}
type CrossSigningKeyMap map[gomatrixserverlib.CrossSigningKeyPurpose]map[gomatrixserverlib.KeyID]gomatrixserverlib.Base64Bytes
// KeyError is returned if there was a problem performing/querying the server
type KeyError struct {
Err string `json:"error"`
@ -182,6 +184,10 @@ type QueryKeysResponse struct {
Failures map[string]interface{}
// Map of user_id to device_id to device_key
DeviceKeys map[string]map[string]json.RawMessage
// Maps of user_id to cross signing key
MasterKeys map[string]gomatrixserverlib.CrossSigningKey
SelfSigningKeys map[string]gomatrixserverlib.CrossSigningKey
UserSigningKeys map[string]gomatrixserverlib.CrossSigningKey
// Set if there was a fatal error processing this query
Error *KeyError
}