mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 21:32:46 +00:00
Initial notary support (#1436)
* Initial work on notary support * Somewhat working (but not properly filtered) notary support, other tweaks * Update gomatrixserverlib
This commit is contained in:
parent
a7563ede3d
commit
a14b29b526
11 changed files with 229 additions and 15 deletions
|
@ -20,7 +20,7 @@ type ServerKeyAPI struct {
|
|||
ServerKeyValidity time.Duration
|
||||
|
||||
OurKeyRing gomatrixserverlib.KeyRing
|
||||
FedClient *gomatrixserverlib.FederationClient
|
||||
FedClient gomatrixserverlib.KeyClient
|
||||
}
|
||||
|
||||
func (s *ServerKeyAPI) KeyRing() *gomatrixserverlib.KeyRing {
|
||||
|
|
|
@ -26,7 +26,7 @@ func AddInternalRoutes(router *mux.Router, intAPI api.ServerKeyInternalAPI, cach
|
|||
// can call functions directly on the returned API or via an HTTP interface using AddInternalRoutes.
|
||||
func NewInternalAPI(
|
||||
cfg *config.ServerKeyAPI,
|
||||
fedClient *gomatrixserverlib.FederationClient,
|
||||
fedClient gomatrixserverlib.KeyClient,
|
||||
caches *caching.Caches,
|
||||
) api.ServerKeyInternalAPI {
|
||||
innerDB, err := storage.NewDatabase(
|
||||
|
@ -53,7 +53,7 @@ func NewInternalAPI(
|
|||
OurKeyRing: gomatrixserverlib.KeyRing{
|
||||
KeyFetchers: []gomatrixserverlib.KeyFetcher{
|
||||
&gomatrixserverlib.DirectKeyFetcher{
|
||||
Client: fedClient.Client,
|
||||
Client: fedClient,
|
||||
},
|
||||
},
|
||||
KeyDatabase: serverKeyDB,
|
||||
|
@ -65,7 +65,7 @@ func NewInternalAPI(
|
|||
perspective := &gomatrixserverlib.PerspectiveKeyFetcher{
|
||||
PerspectiveServerName: ps.ServerName,
|
||||
PerspectiveServerKeys: map[gomatrixserverlib.KeyID]ed25519.PublicKey{},
|
||||
Client: fedClient.Client,
|
||||
Client: fedClient,
|
||||
}
|
||||
|
||||
for _, key := range ps.Keys {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue