aboutsummaryrefslogtreecommitdiff
path: root/common/basecomponent/base.go
diff options
context:
space:
mode:
Diffstat (limited to 'common/basecomponent/base.go')
-rw-r--r--common/basecomponent/base.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/common/basecomponent/base.go b/common/basecomponent/base.go
index 50fc2d5c..dc917ffe 100644
--- a/common/basecomponent/base.go
+++ b/common/basecomponent/base.go
@@ -19,6 +19,8 @@ import (
"io"
"net/http"
+ "golang.org/x/crypto/ed25519"
+
"github.com/matrix-org/dendrite/common/keydb"
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/naffka"
@@ -139,7 +141,12 @@ func (b *BaseDendrite) CreateAccountsDB() *accounts.Database {
// CreateKeyDB creates a new instance of the key database. Should only be called
// once per component.
func (b *BaseDendrite) CreateKeyDB() keydb.Database {
- db, err := keydb.NewDatabase(string(b.Cfg.Database.ServerKey))
+ db, err := keydb.NewDatabase(
+ string(b.Cfg.Database.ServerKey),
+ b.Cfg.Matrix.ServerName,
+ b.Cfg.Matrix.PrivateKey.Public().(ed25519.PublicKey),
+ b.Cfg.Matrix.KeyID,
+ )
if err != nil {
logrus.WithError(err).Panicf("failed to connect to keys db")
}