From 8c2e6273e3667690a3ad121b22214b014bdf26ab Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Thu, 31 Aug 2017 12:28:58 +0100 Subject: [PATCH] Add command to generate test keys/certs (#204) Add `generate-keys` command, which can be used to generate TLS keys/certs, and, more usefully, matrix signing keys. --- INSTALL.md | 11 +--- .../dendrite/cmd/generate-keys/main.go | 65 +++++++++++++++++++ .../matrix-org/dendrite/common/test/config.go | 12 ++-- 3 files changed, 73 insertions(+), 15 deletions(-) create mode 100644 src/github.com/matrix-org/dendrite/cmd/generate-keys/main.go diff --git a/INSTALL.md b/INSTALL.md index e5a4b847..37a08a5c 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -71,21 +71,14 @@ Dendrite requires a postgres database engine, version 9.5 or later. ### Crypto key generation -Generate the keys (unlike synapse, dendrite doesn't autogen yet): +Generate the keys: ```bash # Generate a self-signed SSL cert for federation: test -f server.key || openssl req -x509 -newkey rsa:4096 -keyout server.key -out server.crt -days 3650 -nodes -subj /CN=localhost # generate ed25519 signing key -test -f matrix_key.pem || python3 > matrix_key.pem <