Commit cc3b7794 authored by Julien Muchembled's avatar Julien Muchembled

registry: remove incomplete migration code

I forgot the case where 'config' has slightly different schema.
Now, we don't have any old network left to upgrade.
parent 2305d5e5
......@@ -72,20 +72,11 @@ class RegistryServer(object):
"email TEXT",
"cert TEXT"):
self.db.execute("INSERT INTO cert VALUES ('',null,null)")
if utils.sqliteCreateTable(self.db, "crl",
utils.sqliteCreateTable(self.db, "crl",
"serial INTEGER PRIMARY KEY NOT NULL",
# Expiration date of revoked certificate.
# TODO: purge rows with dates in the past.
"date INTEGER NOT NULL"):
# Revoke certificates produced by previous version.
# They all have serial 0.
try:
date = max(x509.notAfter(x[0]) for x in self.iterCert())
except ValueError:
pass
else:
if time.time() < date:
self.db.execute("INSERT INTO crl VALUES (0,?)", (date,))
"date INTEGER NOT NULL")
self.cert = x509.Cert(self.config.ca, self.config.key)
# Get vpn network prefix
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment