diff options
Diffstat (limited to 'myrpki.rototill/schema.rnc')
-rw-r--r-- | myrpki.rototill/schema.rnc | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/myrpki.rototill/schema.rnc b/myrpki.rototill/schema.rnc new file mode 100644 index 00000000..8ec48195 --- /dev/null +++ b/myrpki.rototill/schema.rnc @@ -0,0 +1,64 @@ +# $Id$ +# +# RelaxNG Schema for MyRPKI XML messages +# +# libxml2 (including xmllint) only groks the XML syntax of RelaxNG, so +# run the compact syntax through trang to get XML syntax. + +default namespace = "http://www.hactrn.net/uris/rpki/myrpki/" + +base64 = xsd:base64Binary { maxLength="512000" } +object_handle = xsd:string { maxLength="255" pattern="[\-_A-Za-z0-9]*" } +pubd_handle = xsd:string { maxLength="255" pattern="[\-_A-Za-z0-9/]*" } +uri = xsd:anyURI { maxLength="4096" } +asn_list = xsd:string { maxLength="512000" pattern="[\-,0-9]*" } +ipv4_list = xsd:string { maxLength="512000" pattern="[\-,0-9/.]*" } +ipv6_list = xsd:string { maxLength="512000" pattern="[\-,0-9/:a-fA-F]*" } + +start = element myrpki { + attribute version { xsd:positiveInteger { maxInclusive="1" } }, + attribute handle { object_handle }, + attribute repository_handle { pubd_handle }, + roa_request_elt*, + child_elt*, + parent_elt*, + bpki_ca_certificate_elt?, + bpki_crl_elt?, + bpki_repository_certificate_elt?, + bpki_bsc_certificate_elt?, + bpki_bsc_pkcs10_elt? +} + +roa_request_elt = element roa_request { + attribute asn { xsd:positiveInteger }, + attribute v4 { ipv4_list }, + attribute v6 { ipv6_list } +} + +child_elt = element child { + attribute handle { object_handle }, + attribute valid_until { xsd:dateTime { pattern=".*Z" } }, + attribute asns { asn_list }?, + attribute v4 { ipv4_list }?, + attribute v6 { ipv6_list }?, + element bpki_certificate { base64 }? +} + +parent_elt = element parent { + attribute handle { object_handle }, + attribute service_uri { uri }?, + attribute myhandle { object_handle }?, + attribute sia_base { uri }?, + element bpki_cms_certificate { base64 }?, + element bpki_https_certificate { base64 }? +} + +bpki_ca_certificate_elt = element bpki_ca_certificate { base64 } +bpki_crl_elt = element bpki_crl { base64 } +bpki_repository_certificate_elt = element bpki_repository_certificate { base64 } +bpki_bsc_certificate_elt = element bpki_bsc_certificate { base64 } +bpki_bsc_pkcs10_elt = element bpki_bsc_pkcs10 { base64 } + +# Local Variables: +# indent-tabs-mode: nil +# End: |