diff --git a/src/github.com/matrix-org/dendrite/cmd/dendrite-federation-api-server/main.go b/src/github.com/matrix-org/dendrite/cmd/dendrite-federation-api-server/main.go index 220a3d9bc..01305a4c9 100644 --- a/src/github.com/matrix-org/dendrite/cmd/dendrite-federation-api-server/main.go +++ b/src/github.com/matrix-org/dendrite/cmd/dendrite-federation-api-server/main.go @@ -49,6 +49,9 @@ func main() { // TODO: make the validity period configurable. ValidityPeriod: 24 * time.Hour, } + cfg.TLSFingerPrints = []gomatrixserverlib.TLSFingerprint{ + {[]byte("o\xe2\xd1\x05A7g\xd6=\x10\xdfq\x9e4\xb1:/\x9co>\x01g\x1d\xb8\xbebFf]\xf0\x89N")}, + } var err error cfg.KeyID, cfg.PrivateKey, err = common.ReadKey(serverKey) diff --git a/src/github.com/matrix-org/dendrite/federationapi/routing/routing.go b/src/github.com/matrix-org/dendrite/federationapi/routing/routing.go index 41486de29..ec5a5223f 100644 --- a/src/github.com/matrix-org/dendrite/federationapi/routing/routing.go +++ b/src/github.com/matrix-org/dendrite/federationapi/routing/routing.go @@ -24,7 +24,7 @@ import ( ) const ( - pathPrefixV2Keys = "/_matrix/keys/v2" + pathPrefixV2Keys = "/_matrix/key/v2" ) // Setup registers HTTP handlers with the given ServeMux. @@ -32,11 +32,12 @@ func Setup(servMux *http.ServeMux, cfg config.FederationAPI) { apiMux := mux.NewRouter() v2keysmux := apiMux.PathPrefix(pathPrefixV2Keys).Subrouter() - v2keysmux.Handle("/server/", - makeAPI("localkeys", func(req *http.Request) util.JSONResponse { - return readers.LocalKeys(req, cfg) - }), - ) + localKeys := makeAPI("localkeys", func(req *http.Request) util.JSONResponse { + return readers.LocalKeys(req, cfg) + }) + + v2keysmux.Handle("/server/{keyID}", localKeys) + v2keysmux.Handle("/server/", localKeys) servMux.Handle("/metrics", prometheus.Handler()) servMux.Handle("/api/", http.StripPrefix("/api", apiMux))