diff options
author | Michael Elkins <melkins@tislabs.com> | 2012-07-06 20:16:16 +0000 |
---|---|---|
committer | Michael Elkins <melkins@tislabs.com> | 2012-07-06 20:16:16 +0000 |
commit | 1182d3e5a181f5d54d792a0552e17af62808291e (patch) | |
tree | be10ec9bfe4d1581f811a6549cfc71fe8b686c8d /rpkid/portal-gui/scripts/rpkigui-check-expired.py | |
parent | 1e1130081320359022796c679a311a3dcced05c1 (diff) |
use the client_handle specified in the <list_published_objects/> response to determine child. references #104.
svn path=/trunk/; revision=4590
Diffstat (limited to 'rpkid/portal-gui/scripts/rpkigui-check-expired.py')
-rw-r--r-- | rpkid/portal-gui/scripts/rpkigui-check-expired.py | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/rpkid/portal-gui/scripts/rpkigui-check-expired.py b/rpkid/portal-gui/scripts/rpkigui-check-expired.py index d6d78a25..3aa080a9 100644 --- a/rpkid/portal-gui/scripts/rpkigui-check-expired.py +++ b/rpkid/portal-gui/scripts/rpkigui-check-expired.py @@ -93,25 +93,17 @@ def check_child_certs(conf): if isinstance(pdu, report_error_elt): print "rpkid reported an error: %s" % pdu.error_code elif isinstance(pdu, list_published_objects_elt): - uri = pdu.uri - if uri.endswith('.cer'): + if pdu.uri.endswith('.cer'): cert = X509() cert.set(Base64=pdu.obj) t = cert.getNotAfter() if Verbose or t <= expire_time: e = 'expired' if t <= now else 'will expire' - subject = cert.getSubject() - - # if the child is hosted by the same rpkid, we can - # determine which client this cert was issued to - qs = ResourceCert.objects.filter(uri=pdu.uri) - child = qs[0].parent.issuer.handle if qs else '<unknown>' - print "%(handle)s's rescert for Child %(child)s %(expire)s on %(date)s uri=%(uri)s subject=%(subject)s" % { 'handle': conf.handle, - 'child': child, + 'child': pdu.child_handle, 'uri': pdu.uri, - 'subject': subject, + 'subject': cert.getSubject(), 'expire': e, 'date': t} |