mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-13 21:02:25 +03:00
Fix notary keys requests for all keys (#3296)
This should be more spec compliant: > If no key IDs are given to be queried, the notary server should query for all keys.
This commit is contained in:
parent
edd02ec468
commit
13c5173273
3 changed files with 144 additions and 3 deletions
|
@ -197,6 +197,10 @@ func localKeys(cfg *config.FederationAPI, serverName spec.ServerName) (*gomatrix
|
|||
return &keys, err
|
||||
}
|
||||
|
||||
type NotaryKeysResponse struct {
|
||||
ServerKeys []json.RawMessage `json:"server_keys"`
|
||||
}
|
||||
|
||||
func NotaryKeys(
|
||||
httpReq *http.Request, cfg *config.FederationAPI,
|
||||
fsAPI federationAPI.FederationInternalAPI,
|
||||
|
@ -217,10 +221,9 @@ func NotaryKeys(
|
|||
}
|
||||
}
|
||||
|
||||
var response struct {
|
||||
ServerKeys []json.RawMessage `json:"server_keys"`
|
||||
response := NotaryKeysResponse{
|
||||
ServerKeys: []json.RawMessage{},
|
||||
}
|
||||
response.ServerKeys = []json.RawMessage{}
|
||||
|
||||
for serverName, kidToCriteria := range req.ServerKeys {
|
||||
var keyList []gomatrixserverlib.ServerKeys
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue