aboutsummaryrefslogtreecommitdiff
path: root/rpkid/rpki/gui
diff options
context:
space:
mode:
authorMichael Elkins <melkins@tislabs.com>2012-01-20 14:13:31 +0000
committerMichael Elkins <melkins@tislabs.com>2012-01-20 14:13:31 +0000
commit329707277cfd17cd5945e72339a320bc5c7f6282 (patch)
treef9b67ea2c4cd5a82a9f41fb44d46b8b842ec1f52 /rpkid/rpki/gui
parent71fb9c69defd516ee6b0c8370551383c774094ae (diff)
store the uri field from <list_received_resources/> pdu in order to allow for checking the cert chain for expiration using cacheview
svn path=/branches/tk161/; revision=4245
Diffstat (limited to 'rpkid/rpki/gui')
-rw-r--r--rpkid/rpki/gui/app/glue.py4
-rw-r--r--rpkid/rpki/gui/app/models.py4
2 files changed, 7 insertions, 1 deletions
diff --git a/rpkid/rpki/gui/app/glue.py b/rpkid/rpki/gui/app/glue.py
index 0319621c..99086ae6 100644
--- a/rpkid/rpki/gui/app/glue.py
+++ b/rpkid/rpki/gui/app/glue.py
@@ -194,7 +194,9 @@ def list_received_resources(log, conf):
not_before = datetime.strptime(pdu.notBefore, "%Y-%m-%dT%H:%M:%SZ")
not_after = datetime.strptime(pdu.notAfter, "%Y-%m-%dT%H:%M:%SZ")
- cert = models.ResourceCert.objects.create(parent=parent, not_before=not_before, not_after=not_after)
+ cert = models.ResourceCert.objects.create(parent=parent,
+ not_before=not_before, not_after=not_after,
+ uri=pdu.uri)
for asn in rpki.resource_set.resource_set_as(pdu.asn):
cert.asn_ranges.create(min=asn.min, max=asn.max)
diff --git a/rpkid/rpki/gui/app/models.py b/rpkid/rpki/gui/app/models.py
index aae2215f..aeccef2f 100644
--- a/rpkid/rpki/gui/app/models.py
+++ b/rpkid/rpki/gui/app/models.py
@@ -86,6 +86,10 @@ class ResourceCert(models.Model):
not_before = models.DateTimeField()
not_after = models.DateTimeField()
+ # Locator for this object. Used to look up the validation status, expiry
+ # of ancestor certs in cacheview
+ uri = models.CharField(max_length=255)
+
def __unicode__(self):
return u"%s's resource cert from parent %s" % (self.parent.issuer.handle, self.parent.handle)