Include signatures in key query

This commit is contained in:
Neil Alexander 2021-07-29 14:35:42 +01:00
parent 870c09be03
commit fba18e8b17
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
9 changed files with 128 additions and 15 deletions

View file

@ -40,8 +40,12 @@ type KeyInternalAPI interface {
QueryDeviceMessages(ctx context.Context, req *QueryDeviceMessagesRequest, res *QueryDeviceMessagesResponse)
}
// Map of purpose -> public key
type CrossSigningKeyMap map[gomatrixserverlib.CrossSigningKeyPurpose]gomatrixserverlib.Base64Bytes
// Map of user ID -> key ID -> signature
type CrossSigningSigMap map[string]map[gomatrixserverlib.KeyID]gomatrixserverlib.Base64Bytes
// KeyError is returned if there was a problem performing/querying the server
type KeyError struct {
Err string `json:"error"`
@ -180,6 +184,9 @@ type PerformUploadDeviceSignaturesResponse struct {
}
type QueryKeysRequest struct {
// The user ID asking for the keys, e.g. if from a client API request.
// Will not be populated if the key request came from federation.
UserID string
// Maps user IDs to a list of devices
UserToDevices map[string][]string
Timeout time.Duration