mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-30 04:52:46 +00:00
Cross-signing signature handling (#1965)
* Handle other signatures * Decorate key ID properly * Match by key IDs * Tweaks * Fixes * Fix /user/keys/query bug, review comments, update sytest-whitelist * Various wtweaks * Fix wiring for keyserver in API mode * Additional fixes
This commit is contained in:
parent
e95b1fd238
commit
b1377d991a
10 changed files with 145 additions and 102 deletions
|
@ -38,12 +38,11 @@ func GetUserDevices(
|
|||
}
|
||||
|
||||
sigReq := &keyapi.QuerySignaturesRequest{
|
||||
TargetIDs: map[string][]gomatrixserverlib.KeyID{},
|
||||
TargetIDs: map[string][]gomatrixserverlib.KeyID{
|
||||
userID: {},
|
||||
},
|
||||
}
|
||||
sigRes := &keyapi.QuerySignaturesResponse{}
|
||||
for _, dev := range res.Devices {
|
||||
sigReq.TargetIDs[userID] = append(sigReq.TargetIDs[userID], gomatrixserverlib.KeyID(dev.DeviceID))
|
||||
}
|
||||
keyAPI.QuerySignatures(req.Context(), sigReq, sigRes)
|
||||
|
||||
response := gomatrixserverlib.RespUserDevices{
|
||||
|
|
|
@ -71,8 +71,14 @@ func QueryDeviceKeys(
|
|||
return util.JSONResponse{
|
||||
Code: 200,
|
||||
JSON: struct {
|
||||
DeviceKeys interface{} `json:"device_keys"`
|
||||
}{queryRes.DeviceKeys},
|
||||
DeviceKeys interface{} `json:"device_keys"`
|
||||
MasterKeys interface{} `json:"master_keys"`
|
||||
SelfSigningKeys interface{} `json:"self_signing_keys"`
|
||||
}{
|
||||
queryRes.DeviceKeys,
|
||||
queryRes.MasterKeys,
|
||||
queryRes.SelfSigningKeys,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue