summary refs log tree commit diff
path: root/synapse/storage/schema/keys.sql
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2014-09-30 15:15:10 +0100
committerMark Haines <mark.haines@matrix.org>2014-09-30 15:15:10 +0100
commitb95a178584cac07018f47e571f48993878da7284 (patch)
tree0e4aba0430e8ecca02afec92d60e52dcd6d0942c /synapse/storage/schema/keys.sql
parentSign federation transactions (diff)
downloadsynapse-b95a178584cac07018f47e571f48993878da7284.tar.xz
SYN-75 Verify signatures on server to server transactions
Diffstat (limited to 'synapse/storage/schema/keys.sql')
-rw-r--r--synapse/storage/schema/keys.sql13
1 files changed, 7 insertions, 6 deletions
diff --git a/synapse/storage/schema/keys.sql b/synapse/storage/schema/keys.sql
index 706a1a03ff..9bf2068d84 100644
--- a/synapse/storage/schema/keys.sql
+++ b/synapse/storage/schema/keys.sql
@@ -14,17 +14,18 @@
  */
 CREATE TABLE IF NOT EXISTS server_tls_certificates(
   server_name TEXT, -- Server name.
-  key_server TEXT, -- Which key server the certificate was fetched from.
+  fingerprint TEXT, -- Certificate fingerprint.
+  from_server TEXT, -- Which key server the certificate was fetched from.
   ts_added_ms INTEGER, -- When the certifcate was added.
   tls_certificate BLOB, -- DER encoded x509 certificate.
-  CONSTRAINT uniqueness UNIQUE (server_name)
+  CONSTRAINT uniqueness UNIQUE (server_name, fingerprint)
 );
 
 CREATE TABLE IF NOT EXISTS server_signature_keys(
   server_name TEXT, -- Server name.
-  key_version TEXT, -- Key version.
-  key_server TEXT, -- Which key server the key was fetched form.
+  key_id TEXT, -- Key version.
+  from_server TEXT, -- Which key server the key was fetched form.
   ts_added_ms INTEGER, -- When the key was added.
-  verification_key BLOB, -- NACL verification key.
-  CONSTRAINT uniqueness UNIQUE (server_name, key_version)
+  verify_key BLOB, -- NACL verification key.
+  CONSTRAINT uniqueness UNIQUE (server_name, key_id)
 );