aboutsummaryrefslogtreecommitdiff
path: root/rpkid
diff options
context:
space:
mode:
Diffstat (limited to 'rpkid')
-rw-r--r--rpkid/irbe_cli.py2
-rw-r--r--rpkid/left-right-schema.rnc2
-rw-r--r--rpkid/left-right-schema.rng1
-rw-r--r--rpkid/rpki/left_right.py9
-rw-r--r--rpkid/rpki/relaxng.py1
5 files changed, 9 insertions, 6 deletions
diff --git a/rpkid/irbe_cli.py b/rpkid/irbe_cli.py
index f5b6bdb9..9b680485 100644
--- a/rpkid/irbe_cli.py
+++ b/rpkid/irbe_cli.py
@@ -181,7 +181,7 @@ class list_published_objects_elt(cmd_elt_mixin, rpki.left_right.list_published_o
excludes = ("uri",)
class list_received_resources_elt(cmd_elt_mixin, rpki.left_right.list_received_resources_elt):
- excludes = ("notBefore", "notAfter", "uri", "sia_uri", "aia_uri", "asn", "ipv4", "ipv6")
+ excludes = ("parent_handle", "notBefore", "notAfter", "uri", "sia_uri", "aia_uri", "asn", "ipv4", "ipv6")
class report_error_elt(reply_elt_mixin, rpki.left_right.report_error_elt):
pass
diff --git a/rpkid/left-right-schema.rnc b/rpkid/left-right-schema.rnc
index ad30c5dd..c3efd7a6 100644
--- a/rpkid/left-right-schema.rnc
+++ b/rpkid/left-right-schema.rnc
@@ -271,7 +271,7 @@ list_received_resources_query = element list_received_resources {
}
list_received_resources_reply = element list_received_resources {
- tag, self_handle,
+ tag, self_handle, parent_handle,
attribute notBefore { xsd:dateTime { pattern=".*Z" } },
attribute notAfter { xsd:dateTime { pattern=".*Z" } },
attribute uri { uri },
diff --git a/rpkid/left-right-schema.rng b/rpkid/left-right-schema.rng
index ac647a0a..bb6b4985 100644
--- a/rpkid/left-right-schema.rng
+++ b/rpkid/left-right-schema.rng
@@ -921,6 +921,7 @@
<element name="list_received_resources">
<ref name="tag"/>
<ref name="self_handle"/>
+ <ref name="parent_handle"/>
<attribute name="notBefore">
<data type="dateTime">
<param name="pattern">.*Z</param>
diff --git a/rpkid/rpki/left_right.py b/rpkid/rpki/left_right.py
index 23cf6f6b..5b3d65a7 100644
--- a/rpkid/rpki/left_right.py
+++ b/rpkid/rpki/left_right.py
@@ -1018,7 +1018,7 @@ class list_received_resources_elt(rpki.xml_utils.base_elt, left_right_namespace)
"""
element_name = "list_received_resources"
- attributes = ("self_handle", "tag",
+ attributes = ("self_handle", "tag", "parent_handle",
"notBefore", "notAfter", "uri", "sia_uri", "aia_uri", "asn", "ipv4", "ipv6")
def serve_dispatch(self, r_msg, cb, eb):
@@ -1028,14 +1028,14 @@ class list_received_resources_elt(rpki.xml_utils.base_elt, left_right_namespace)
just dump a bunch of data about every certificate issued to us by
one of our parents, then return.
"""
- for parent in self_elt.serve_fetch_handle(self.gctx, None, self.self_handle).parents():
+ for parent in self_elt.serve_fetch_handle(self.gctx, None, self.self_handle).parents():
for ca in parent.cas():
ca_detail = ca.fetch_active()
if ca_detail is not None and ca_detail.latest_ca_cert is not None:
- r_msg.append(self.make_reply(ca_detail.ca_cert_uri, ca_detail.latest_ca_cert))
+ r_msg.append(self.make_reply(parent.parent_handle, ca_detail.ca_cert_uri, ca_detail.latest_ca_cert))
cb()
- def make_reply(self, uri, cert):
+ def make_reply(self, parent_handle, uri, cert):
"""
Generate one reply PDU.
"""
@@ -1043,6 +1043,7 @@ class list_received_resources_elt(rpki.xml_utils.base_elt, left_right_namespace)
return self.make_pdu(
tag = self.tag,
self_handle = self.self_handle,
+ parent_handle = parent_handle,
notBefore = str(cert.getNotBefore()),
notAfter = str(cert.getNotAfter()),
uri = uri,
diff --git a/rpkid/rpki/relaxng.py b/rpkid/rpki/relaxng.py
index 1a104057..5deb523b 100644
--- a/rpkid/rpki/relaxng.py
+++ b/rpkid/rpki/relaxng.py
@@ -927,6 +927,7 @@ left_right = lxml.etree.RelaxNG(lxml.etree.fromstring('''<?xml version="1.0" enc
<element name="list_received_resources">
<ref name="tag"/>
<ref name="self_handle"/>
+ <ref name="parent_handle"/>
<attribute name="notBefore">
<data type="dateTime">
<param name="pattern">.*Z</param>