summary refs log tree commit diff
path: root/synapse/config/key.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2019-03-19 12:27:07 +0000
committerGitHub <noreply@github.com>2019-03-19 12:27:07 +0000
commit5cf00c9f6085b62860e3e10f35f21e4004c70cef (patch)
treec113c95b90be39a6f0823365be6ac8087f800805 /synapse/config/key.py
parentMerge pull request #4888 from matrix-org/rav/fix_disabled_hs (diff)
parentFix RegistrationTestCase (diff)
downloadsynapse-5cf00c9f6085b62860e3e10f35f21e4004c70cef.tar.xz
Merge pull request #4889 from matrix-org/rav/test_real_config
Use a regular HomeServerConfig object for unit tests
Diffstat (limited to 'synapse/config/key.py')
-rw-r--r--synapse/config/key.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/synapse/config/key.py b/synapse/config/key.py
index 2bd5531acb..933928885a 100644
--- a/synapse/config/key.py
+++ b/synapse/config/key.py
@@ -38,7 +38,12 @@ logger = logging.getLogger(__name__)
 class KeyConfig(Config):
 
     def read_config(self, config):
-        self.signing_key = self.read_signing_key(config["signing_key_path"])
+        # the signing key can be specified inline or in a separate file
+        if "signing_key" in config:
+            self.signing_key = read_signing_keys([config["signing_key"]])
+        else:
+            self.signing_key = self.read_signing_key(config["signing_key_path"])
+
         self.old_signing_keys = self.read_old_signing_keys(
             config.get("old_signing_keys", {})
         )