From c5e1ae4c18a7bb8ecf9370b913e1de1ebc64f398 Mon Sep 17 00:00:00 2001
From: Matthias Andreas Benkard <code@mail.matthias.benkard.de>
Date: Sat, 16 Jun 2012 16:05:33 +0200
Subject: Accept client certificate information from a frontend reverse proxy.

---
 schema.sql | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

(limited to 'schema.sql')

diff --git a/schema.sql b/schema.sql
index f1f07fc..ab9abb8 100644
--- a/schema.sql
+++ b/schema.sql
@@ -21,6 +21,21 @@ CREATE TABLE openids(
   FOREIGN KEY("user") REFERENCES users
 );
 
+CREATE TABLE rsa_keys(
+  modulus  VARCHAR   NOT NULL,
+  exponent VARCHAR   NOT NULL,
+  PRIMARY KEY(modulus, exponent)
+);
+
+CREATE TABLE user_rsa_keys(
+  "user"   INTEGER   NOT NULL,
+  modulus  VARCHAR   NOT NULL,
+  exponent VARCHAR   NOT NULL,
+  PRIMARY KEY("user", modulus, exponent),
+  FOREIGN KEY("user") REFERENCES users,
+  FOREIGN KEY(modulus, exponent) REFERENCES rsa_keys
+);
+
 CREATE TABLE user_email_addresses(
   "user"       INTEGER   NOT NULL,
   email        VARCHAR   NOT NULL,
-- 
cgit v1.2.3

