aboutsummaryrefslogtreecommitdiff
path: root/rpkid/router-certificate-schema.rnc
diff options
context:
space:
mode:
Diffstat (limited to 'rpkid/router-certificate-schema.rnc')
-rw-r--r--rpkid/router-certificate-schema.rnc57
1 files changed, 57 insertions, 0 deletions
diff --git a/rpkid/router-certificate-schema.rnc b/rpkid/router-certificate-schema.rnc
new file mode 100644
index 00000000..a98143e1
--- /dev/null
+++ b/rpkid/router-certificate-schema.rnc
@@ -0,0 +1,57 @@
+# $Id$
+#
+# RelaxNG Schema for BGPSEC router certificate interchange format.
+#
+# At least for now, this is a trivial encapsulation of a PKCS #10
+# request, a set (usually containing exactly one member) of autonomous
+# system numbers, and a router-id. Be warned that this could change
+# radically by the time we have any real operational understanding of
+# how these things will be used, this is just our current best guess
+# to let us move forward on initial coding.
+#
+# libxml2 (including xmllint) only groks the XML syntax of RelaxNG, so
+# run the compact syntax through trang to get XML syntax.
+#
+# Copyright (C) 2014 Dragon Research Labs ("DRL")
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND DRL DISCLAIMS ALL WARRANTIES WITH
+# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS. IN NO EVENT SHALL DRL BE LIABLE FOR ANY SPECIAL, DIRECT,
+# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+# PERFORMANCE OF THIS SOFTWARE.
+
+default namespace = "http://www.hactrn.net/uris/rpki/router-certificate/"
+
+version = "1"
+
+base64 = xsd:base64Binary { maxLength="512000" }
+router_id = xsd:unsignedInt { minExclusive="0" }
+asn_list = xsd:string { maxLength="512000" pattern="[\-,0-9]*" }
+timestamp = xsd:dateTime { pattern=".*Z" }
+
+# Core PDU used in this schema.
+
+router_certificate_request = element router_certificate_request {
+ attribute router_id { router_id },
+ attribute asn { asn_list },
+ attribute valid_until { timestamp }?,
+ base64
+}
+
+start |= router_certificate_request
+
+# Wrapper element to support multiple requests in a single document.
+
+start |= element router_certificate_requests {
+ router_certificate_request*
+}
+
+# Local Variables:
+# indent-tabs-mode: nil
+# End: