aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/up-down-protocol-samples/error_response.xml2
-rw-r--r--scripts/up-down-protocol-samples/issue.xml6
-rw-r--r--scripts/up-down-protocol-samples/issue_response.xml18
-rw-r--r--scripts/up-down-protocol-samples/list_response.xml18
-rw-r--r--scripts/up-down-tighter-schema.pl41
-rw-r--r--scripts/up-down-tighter-schema.rnc42
-rw-r--r--scripts/up-down-tighter-schema.rng55
7 files changed, 117 insertions, 65 deletions
diff --git a/scripts/up-down-protocol-samples/error_response.xml b/scripts/up-down-protocol-samples/error_response.xml
index 56b983a1..82ef0258 100644
--- a/scripts/up-down-protocol-samples/error_response.xml
+++ b/scripts/up-down-protocol-samples/error_response.xml
@@ -5,7 +5,7 @@
recipient="recipient name"
msg_ref="42"
type="error_response">
- <status>666</status>
+ <status>2001</status>
<last_msg_processed>17</last_msg_processed>
<description xml:lang="en-US">[Readable text]</description>
</message>
diff --git a/scripts/up-down-protocol-samples/issue.xml b/scripts/up-down-protocol-samples/issue.xml
index da0fb957..1efc6644 100644
--- a/scripts/up-down-protocol-samples/issue.xml
+++ b/scripts/up-down-protocol-samples/issue.xml
@@ -5,9 +5,9 @@
recipient="recipient name"
msg_ref="42" type="issue">
<request class_name="class name"
- req_resource_set_as="as resource set"
- req_resource_set_ipv4="ipv4 resource set"
- req_resource_set_ipv6="ipv6 resource set">
+ req_resource_set_as=""
+ req_resource_set_ipv4="10.0.0.44/32"
+ req_resource_set_ipv6="dead:beef::/32">
deadbeef
</request>
</message>
diff --git a/scripts/up-down-protocol-samples/issue_response.xml b/scripts/up-down-protocol-samples/issue_response.xml
index e6049b4d..13fcdb35 100644
--- a/scripts/up-down-protocol-samples/issue_response.xml
+++ b/scripts/up-down-protocol-samples/issue_response.xml
@@ -8,19 +8,19 @@
<class class_name="class name"
cert_url="url"
cert_ski="g(ski)"
- resource_set_as="as resource set"
- resource_set_ipv4="ipv4 resource set"
- resource_set_ipv6="ipv6 resource set">
+ resource_set_as="22,42,44444-5555555"
+ resource_set_ipv4="10.0.0.44-10.3.0.44,10.6.0.2/32"
+ resource_set_ipv6="dead:beef::/128">
<certificate cert_url="url"
cert_ski="g(ski)"
cert_aki="g(aki)"
cert_serial="1"
- resource_set_as="as resource set"
- resource_set_ipv4="ipv4 resource set"
- resource_set_ipv6="ipv6 resource set"
- req_resource_set_as="as resource set"
- req_resource_set_ipv4="ipv4 resource set"
- req_resource_set_ipv6="ipv6 resource set"
+ resource_set_as="14-17"
+ resource_set_ipv4="128.224.1.136/22"
+ resource_set_ipv6="0:0::/22"
+ req_resource_set_as=""
+ req_resource_set_ipv4="10.0.0.77/16,127.0.0.1/8"
+ req_resource_set_ipv6="dead:beef::/16"
status="match">
deadbeef
</certificate>
diff --git a/scripts/up-down-protocol-samples/list_response.xml b/scripts/up-down-protocol-samples/list_response.xml
index e2b62364..373112be 100644
--- a/scripts/up-down-protocol-samples/list_response.xml
+++ b/scripts/up-down-protocol-samples/list_response.xml
@@ -8,20 +8,20 @@
<class class_name="class name"
cert_url="url"
cert_ski="g(ski)"
- resource_set_as="as resource set"
- resource_set_ipv4="ipv4 resource set"
- resource_set_ipv6="ipv6 resource set"
+ resource_set_as="1,2,4,6,16-32"
+ resource_set_ipv4="128.224.1.1-128.22.4.32"
+ resource_set_ipv6=""
suggested_sia_head="rsync://wombat.example/fnord/">
<certificate cert_url="url"
cert_ski="g(ski)"
cert_aki="g(aki)"
cert_serial="1"
- resource_set_as="as resource set"
- resource_set_ipv4="ipv4 resource set"
- resource_set_ipv6="ipv6 resource set"
- req_resource_set_as="as resource set"
- req_resource_set_ipv4="ipv4 resource set"
- req_resource_set_ipv6="ipv6 resource set"
+ resource_set_as=""
+ resource_set_ipv4=""
+ resource_set_ipv6=""
+ req_resource_set_as=""
+ req_resource_set_ipv4=""
+ req_resource_set_ipv6=""
status="match">
deadbeef
</certificate>
diff --git a/scripts/up-down-tighter-schema.pl b/scripts/up-down-tighter-schema.pl
index e31a62d9..45175a55 100644
--- a/scripts/up-down-tighter-schema.pl
+++ b/scripts/up-down-tighter-schema.pl
@@ -12,19 +12,22 @@
# Note that the regexps here are RelaxNG, not Perl, slightly different.
-my $as_set = '[0-9]+(,[0-9]+)?';
+my $as = '([0-9]+|[0-9]+-[0-9]+)';
+my $as_set = "(${as}(,${as})*)?";
-my $octet = '[0-9]|1[0-9]|2[0-4]|25[0-5]';
-my $ipv4 = "(${octet}\.){3}${octet}";
-my $ipv4p = "${ipv4}/([0-9]|[12][0-9]|3[0-2])";
+my $octet = '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])';
+my $ipv4 = "(${octet}\\.){3}${octet}";
+my $ipv4p = "(${ipv4}/([0-9]|[12][0-9]|3[0-2]))";
my $ipv4r = "${ipv4}-${ipv4}";
-my $ipv4_set = "${ipv4p}|${ipv4r}";
+my $ipv4pr = "(${ipv4p}|${ipv4r})";
+my $ipv4_set = "(${ipv4pr}(,${ipv4pr})*)?";
-my $nibble = '0|[1-9a-fA-F][0-9a-fA-F]{0,3}';
-my $ipv6 = "::|(${nibble}:){0,7}(:|${nibble})";
-my $ipv6p = "${ipv6}/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])";
+my $nibble = '(0|[1-9a-fA-F][0-9a-fA-F]{0,3})';
+my $ipv6 = "(::|(${nibble}:){0,7}(:|${nibble}))";
+my $ipv6p = "(${ipv6}/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))";
my $ipv6r = "${ipv6}-${ipv6}";
-my $ipv6_set = "${ipv6r}|${ipv6p}";
+my $ipv6pr = "(${ipv6r}|${ipv6p})";
+my $ipv6_set = "(${ipv6pr}(,${ipv6pr})*)?";
my $rnc = qq{# \$Id\$
# Automatically generated from $0
@@ -58,7 +61,7 @@ my $rnc = qq{# \$Id\$
attribute resource_set_as { xsd:string { maxLength="512000" pattern="${as_set}" } },
attribute resource_set_ipv4 { xsd:string { maxLength="512000" pattern="${ipv4_set}" } },
attribute resource_set_ipv6 { xsd:string { maxLength="512000" pattern="${ipv6_set}" } },
- attribute suggested_sia_head { xsd:string { maxLength="1024" } }?,
+ attribute suggested_sia_head { xsd:anyURI { maxLength="1024" } }?,
element certificate {
attribute cert_url { xsd:anyURI { maxLength="1024" } },
attribute cert_ski { xsd:token { maxLength="1024" } },
@@ -94,7 +97,19 @@ my $rnc = qq{# \$Id\$
}
error_response =
- element status { xsd:positiveInteger { maxInclusive="999999999999999" } },
+ element status {
+ "1101" | # Message too old
+ "1102" | # msg_ref value is invalid
+ "1103" | # out of order msg_ref value
+ "1104" | # version number error
+ "1105" | # unrecognised request type
+ "1201" | # request - no such resource class
+ "1202" | # request - no resources allocated in resource class
+ "1203" | # request - badly formed certificate request
+ "1301" | # revoke - no such resource class
+ "1302" | # revoke - no such key
+ "2001" # Internal Server Error - Request not performed
+ },
element last_msg_processed { xsd:positiveInteger { maxInclusive="999999999999999" } }?,
element description { attribute xml:lang { xsd:language }, xsd:string { maxLength="1024" } }?
}
@@ -107,3 +122,7 @@ open(F, ">", "$_.rnc") or die;
print(F $rnc) or die;
close(F) or die;
exec("trang", "$_.rnc", "$_.rng") or die;
+
+# Local Variables:
+# compile-command: "perl up-down-tighter-schema.pl"
+# End:
diff --git a/scripts/up-down-tighter-schema.rnc b/scripts/up-down-tighter-schema.rnc
index 06ddd19e..b146bab9 100644
--- a/scripts/up-down-tighter-schema.rnc
+++ b/scripts/up-down-tighter-schema.rnc
@@ -1,5 +1,5 @@
# $Id$
-# Automatically generated from ./up-down-tighter-schema.pl
+# Automatically generated from up-down-tighter-schema.pl
default namespace = "http://www.apnic.net/specs/rescerts/up-down/"
@@ -27,21 +27,21 @@
attribute class_name { xsd:token { maxLength="1024" } },
attribute cert_url { xsd:anyURI { maxLength="1024" } },
attribute cert_ski { xsd:token { maxLength="1024" } },
- attribute resource_set_as { xsd:string { maxLength="512000" pattern="[0-9]+(,[0-9]+)?" } },
- attribute resource_set_ipv4 { xsd:string { maxLength="512000" pattern="([0-9]|1[0-9]|2[0-4]|25[0-5].){3}[0-9]|1[0-9]|2[0-4]|25[0-5]/([0-9]|[12][0-9]|3[0-2])|([0-9]|1[0-9]|2[0-4]|25[0-5].){3}[0-9]|1[0-9]|2[0-4]|25[0-5]-([0-9]|1[0-9]|2[0-4]|25[0-5].){3}[0-9]|1[0-9]|2[0-4]|25[0-5]" } },
- attribute resource_set_ipv6 { xsd:string { maxLength="512000" pattern="::|(0|[1-9a-fA-F][0-9a-fA-F]{0,3}:){0,7}(:|0|[1-9a-fA-F][0-9a-fA-F]{0,3})-::|(0|[1-9a-fA-F][0-9a-fA-F]{0,3}:){0,7}(:|0|[1-9a-fA-F][0-9a-fA-F]{0,3})|::|(0|[1-9a-fA-F][0-9a-fA-F]{0,3}:){0,7}(:|0|[1-9a-fA-F][0-9a-fA-F]{0,3})/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])" } },
- attribute suggested_sia_head { xsd:string { maxLength="1024" } }?,
+ attribute resource_set_as { xsd:string { maxLength="512000" pattern="(([0-9]+|[0-9]+-[0-9]+)(,([0-9]+|[0-9]+-[0-9]+))*)?" } },
+ attribute resource_set_ipv4 { xsd:string { maxLength="512000" pattern="((((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2]))|(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])-(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]))(,(((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2]))|(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])-(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])))*)?" } },
+ attribute resource_set_ipv6 { xsd:string { maxLength="512000" pattern="(((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))-(::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))|((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])))(,((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))-(::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))|((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))))*)?" } },
+ attribute suggested_sia_head { xsd:anyURI { maxLength="1024" } }?,
element certificate {
attribute cert_url { xsd:anyURI { maxLength="1024" } },
attribute cert_ski { xsd:token { maxLength="1024" } },
attribute cert_aki { xsd:token { maxLength="1024" } },
attribute cert_serial { xsd:positiveInteger },
- attribute resource_set_as { xsd:string { maxLength="512000" pattern="[0-9]+(,[0-9]+)?" } },
- attribute resource_set_ipv4 { xsd:string { maxLength="512000" pattern="([0-9]|1[0-9]|2[0-4]|25[0-5].){3}[0-9]|1[0-9]|2[0-4]|25[0-5]/([0-9]|[12][0-9]|3[0-2])|([0-9]|1[0-9]|2[0-4]|25[0-5].){3}[0-9]|1[0-9]|2[0-4]|25[0-5]-([0-9]|1[0-9]|2[0-4]|25[0-5].){3}[0-9]|1[0-9]|2[0-4]|25[0-5]" } },
- attribute resource_set_ipv6 { xsd:string { maxLength="512000" pattern="::|(0|[1-9a-fA-F][0-9a-fA-F]{0,3}:){0,7}(:|0|[1-9a-fA-F][0-9a-fA-F]{0,3})-::|(0|[1-9a-fA-F][0-9a-fA-F]{0,3}:){0,7}(:|0|[1-9a-fA-F][0-9a-fA-F]{0,3})|::|(0|[1-9a-fA-F][0-9a-fA-F]{0,3}:){0,7}(:|0|[1-9a-fA-F][0-9a-fA-F]{0,3})/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])" } },
- attribute req_resource_set_as { xsd:string { maxLength="512000" pattern="[0-9]+(,[0-9]+)?" } }?,
- attribute req_resource_set_ipv4 { xsd:string { maxLength="512000" pattern="([0-9]|1[0-9]|2[0-4]|25[0-5].){3}[0-9]|1[0-9]|2[0-4]|25[0-5]/([0-9]|[12][0-9]|3[0-2])|([0-9]|1[0-9]|2[0-4]|25[0-5].){3}[0-9]|1[0-9]|2[0-4]|25[0-5]-([0-9]|1[0-9]|2[0-4]|25[0-5].){3}[0-9]|1[0-9]|2[0-4]|25[0-5]" } }?,
- attribute req_resource_set_ipv6 { xsd:string { maxLength="512000" pattern="::|(0|[1-9a-fA-F][0-9a-fA-F]{0,3}:){0,7}(:|0|[1-9a-fA-F][0-9a-fA-F]{0,3})-::|(0|[1-9a-fA-F][0-9a-fA-F]{0,3}:){0,7}(:|0|[1-9a-fA-F][0-9a-fA-F]{0,3})|::|(0|[1-9a-fA-F][0-9a-fA-F]{0,3}:){0,7}(:|0|[1-9a-fA-F][0-9a-fA-F]{0,3})/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])" } }?,
+ attribute resource_set_as { xsd:string { maxLength="512000" pattern="(([0-9]+|[0-9]+-[0-9]+)(,([0-9]+|[0-9]+-[0-9]+))*)?" } },
+ attribute resource_set_ipv4 { xsd:string { maxLength="512000" pattern="((((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2]))|(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])-(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]))(,(((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2]))|(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])-(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])))*)?" } },
+ attribute resource_set_ipv6 { xsd:string { maxLength="512000" pattern="(((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))-(::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))|((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])))(,((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))-(::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))|((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))))*)?" } },
+ attribute req_resource_set_as { xsd:string { maxLength="512000" pattern="(([0-9]+|[0-9]+-[0-9]+)(,([0-9]+|[0-9]+-[0-9]+))*)?" } }?,
+ attribute req_resource_set_ipv4 { xsd:string { maxLength="512000" pattern="((((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2]))|(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])-(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]))(,(((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2]))|(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])-(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])))*)?" } }?,
+ attribute req_resource_set_ipv6 { xsd:string { maxLength="512000" pattern="(((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))-(::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))|((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])))(,((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))-(::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))|((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))))*)?" } }?,
attribute status { "undersize" | "match" | "oversize" },
xsd:base64Binary { maxLength="512000" }
}*,
@@ -50,9 +50,9 @@
issue_request = element request {
attribute class_name { xsd:token { maxLength="1024" } },
- attribute req_resource_set_as { xsd:string { maxLength="512000" pattern="[0-9]+(,[0-9]+)?" } }?,
- attribute req_resource_set_ipv4 { xsd:string { maxLength="512000" pattern="([0-9]|1[0-9]|2[0-4]|25[0-5].){3}[0-9]|1[0-9]|2[0-4]|25[0-5]/([0-9]|[12][0-9]|3[0-2])|([0-9]|1[0-9]|2[0-4]|25[0-5].){3}[0-9]|1[0-9]|2[0-4]|25[0-5]-([0-9]|1[0-9]|2[0-4]|25[0-5].){3}[0-9]|1[0-9]|2[0-4]|25[0-5]" } }?,
- attribute req_resource_set_ipv6 { xsd:string { maxLength="512000" pattern="::|(0|[1-9a-fA-F][0-9a-fA-F]{0,3}:){0,7}(:|0|[1-9a-fA-F][0-9a-fA-F]{0,3})-::|(0|[1-9a-fA-F][0-9a-fA-F]{0,3}:){0,7}(:|0|[1-9a-fA-F][0-9a-fA-F]{0,3})|::|(0|[1-9a-fA-F][0-9a-fA-F]{0,3}:){0,7}(:|0|[1-9a-fA-F][0-9a-fA-F]{0,3})/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])" } }?,
+ attribute req_resource_set_as { xsd:string { maxLength="512000" pattern="(([0-9]+|[0-9]+-[0-9]+)(,([0-9]+|[0-9]+-[0-9]+))*)?" } }?,
+ attribute req_resource_set_ipv4 { xsd:string { maxLength="512000" pattern="((((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2]))|(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])-(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]))(,(((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2]))|(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])-(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])))*)?" } }?,
+ attribute req_resource_set_ipv6 { xsd:string { maxLength="512000" pattern="(((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))-(::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))|((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])))(,((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))-(::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))|((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))))*)?" } }?,
xsd:base64Binary { maxLength="512000" }
}
issue_response = class
@@ -66,7 +66,19 @@
}
error_response =
- element status { xsd:positiveInteger { maxInclusive="999999999999999" } },
+ element status {
+ "1101" | # Message too old
+ "1102" | # msg_ref value is invalid
+ "1103" | # out of order msg_ref value
+ "1104" | # version number error
+ "1105" | # unrecognised request type
+ "1201" | # request - no such resource class
+ "1202" | # request - no resources allocated in resource class
+ "1203" | # request - badly formed certificate request
+ "1301" | # revoke - no such resource class
+ "1302" | # revoke - no such key
+ "2001" # Internal Server Error - Request not performed
+ },
element last_msg_processed { xsd:positiveInteger { maxInclusive="999999999999999" } }?,
element description { attribute xml:lang { xsd:language }, xsd:string { maxLength="1024" } }?
}
diff --git a/scripts/up-down-tighter-schema.rng b/scripts/up-down-tighter-schema.rng
index ef4b9644..87b982d8 100644
--- a/scripts/up-down-tighter-schema.rng
+++ b/scripts/up-down-tighter-schema.rng
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Id$
- Automatically generated from ./up-down-tighter-schema.pl
+ Automatically generated from up-down-tighter-schema.pl
-->
<grammar ns="http://www.apnic.net/specs/rescerts/up-down/" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<start>
@@ -99,24 +99,24 @@
<attribute name="resource_set_as">
<data type="string">
<param name="maxLength">512000</param>
- <param name="pattern">[0-9]+(,[0-9]+)?</param>
+ <param name="pattern">(([0-9]+|[0-9]+-[0-9]+)(,([0-9]+|[0-9]+-[0-9]+))*)?</param>
</data>
</attribute>
<attribute name="resource_set_ipv4">
<data type="string">
<param name="maxLength">512000</param>
- <param name="pattern">([0-9]|1[0-9]|2[0-4]|25[0-5].){3}[0-9]|1[0-9]|2[0-4]|25[0-5]/([0-9]|[12][0-9]|3[0-2])|([0-9]|1[0-9]|2[0-4]|25[0-5].){3}[0-9]|1[0-9]|2[0-4]|25[0-5]-([0-9]|1[0-9]|2[0-4]|25[0-5].){3}[0-9]|1[0-9]|2[0-4]|25[0-5]</param>
+ <param name="pattern">((((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2]))|(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])-(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]))(,(((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2]))|(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])-(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])))*)?</param>
</data>
</attribute>
<attribute name="resource_set_ipv6">
<data type="string">
<param name="maxLength">512000</param>
- <param name="pattern">::|(0|[1-9a-fA-F][0-9a-fA-F]{0,3}:){0,7}(:|0|[1-9a-fA-F][0-9a-fA-F]{0,3})-::|(0|[1-9a-fA-F][0-9a-fA-F]{0,3}:){0,7}(:|0|[1-9a-fA-F][0-9a-fA-F]{0,3})|::|(0|[1-9a-fA-F][0-9a-fA-F]{0,3}:){0,7}(:|0|[1-9a-fA-F][0-9a-fA-F]{0,3})/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])</param>
+ <param name="pattern">(((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))-(::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))|((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])))(,((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))-(::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))|((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))))*)?</param>
</data>
</attribute>
<optional>
<attribute name="suggested_sia_head">
- <data type="string">
+ <data type="anyURI">
<param name="maxLength">1024</param>
</data>
</attribute>
@@ -144,26 +144,26 @@
<attribute name="resource_set_as">
<data type="string">
<param name="maxLength">512000</param>
- <param name="pattern">[0-9]+(,[0-9]+)?</param>
+ <param name="pattern">(([0-9]+|[0-9]+-[0-9]+)(,([0-9]+|[0-9]+-[0-9]+))*)?</param>
</data>
</attribute>
<attribute name="resource_set_ipv4">
<data type="string">
<param name="maxLength">512000</param>
- <param name="pattern">([0-9]|1[0-9]|2[0-4]|25[0-5].){3}[0-9]|1[0-9]|2[0-4]|25[0-5]/([0-9]|[12][0-9]|3[0-2])|([0-9]|1[0-9]|2[0-4]|25[0-5].){3}[0-9]|1[0-9]|2[0-4]|25[0-5]-([0-9]|1[0-9]|2[0-4]|25[0-5].){3}[0-9]|1[0-9]|2[0-4]|25[0-5]</param>
+ <param name="pattern">((((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2]))|(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])-(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]))(,(((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2]))|(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])-(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])))*)?</param>
</data>
</attribute>
<attribute name="resource_set_ipv6">
<data type="string">
<param name="maxLength">512000</param>
- <param name="pattern">::|(0|[1-9a-fA-F][0-9a-fA-F]{0,3}:){0,7}(:|0|[1-9a-fA-F][0-9a-fA-F]{0,3})-::|(0|[1-9a-fA-F][0-9a-fA-F]{0,3}:){0,7}(:|0|[1-9a-fA-F][0-9a-fA-F]{0,3})|::|(0|[1-9a-fA-F][0-9a-fA-F]{0,3}:){0,7}(:|0|[1-9a-fA-F][0-9a-fA-F]{0,3})/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])</param>
+ <param name="pattern">(((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))-(::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))|((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])))(,((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))-(::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))|((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))))*)?</param>
</data>
</attribute>
<optional>
<attribute name="req_resource_set_as">
<data type="string">
<param name="maxLength">512000</param>
- <param name="pattern">[0-9]+(,[0-9]+)?</param>
+ <param name="pattern">(([0-9]+|[0-9]+-[0-9]+)(,([0-9]+|[0-9]+-[0-9]+))*)?</param>
</data>
</attribute>
</optional>
@@ -171,7 +171,7 @@
<attribute name="req_resource_set_ipv4">
<data type="string">
<param name="maxLength">512000</param>
- <param name="pattern">([0-9]|1[0-9]|2[0-4]|25[0-5].){3}[0-9]|1[0-9]|2[0-4]|25[0-5]/([0-9]|[12][0-9]|3[0-2])|([0-9]|1[0-9]|2[0-4]|25[0-5].){3}[0-9]|1[0-9]|2[0-4]|25[0-5]-([0-9]|1[0-9]|2[0-4]|25[0-5].){3}[0-9]|1[0-9]|2[0-4]|25[0-5]</param>
+ <param name="pattern">((((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2]))|(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])-(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]))(,(((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2]))|(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])-(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])))*)?</param>
</data>
</attribute>
</optional>
@@ -179,7 +179,7 @@
<attribute name="req_resource_set_ipv6">
<data type="string">
<param name="maxLength">512000</param>
- <param name="pattern">::|(0|[1-9a-fA-F][0-9a-fA-F]{0,3}:){0,7}(:|0|[1-9a-fA-F][0-9a-fA-F]{0,3})-::|(0|[1-9a-fA-F][0-9a-fA-F]{0,3}:){0,7}(:|0|[1-9a-fA-F][0-9a-fA-F]{0,3})|::|(0|[1-9a-fA-F][0-9a-fA-F]{0,3}:){0,7}(:|0|[1-9a-fA-F][0-9a-fA-F]{0,3})/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])</param>
+ <param name="pattern">(((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))-(::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))|((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])))(,((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))-(::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))|((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))))*)?</param>
</data>
</attribute>
</optional>
@@ -213,7 +213,7 @@
<attribute name="req_resource_set_as">
<data type="string">
<param name="maxLength">512000</param>
- <param name="pattern">[0-9]+(,[0-9]+)?</param>
+ <param name="pattern">(([0-9]+|[0-9]+-[0-9]+)(,([0-9]+|[0-9]+-[0-9]+))*)?</param>
</data>
</attribute>
</optional>
@@ -221,7 +221,7 @@
<attribute name="req_resource_set_ipv4">
<data type="string">
<param name="maxLength">512000</param>
- <param name="pattern">([0-9]|1[0-9]|2[0-4]|25[0-5].){3}[0-9]|1[0-9]|2[0-4]|25[0-5]/([0-9]|[12][0-9]|3[0-2])|([0-9]|1[0-9]|2[0-4]|25[0-5].){3}[0-9]|1[0-9]|2[0-4]|25[0-5]-([0-9]|1[0-9]|2[0-4]|25[0-5].){3}[0-9]|1[0-9]|2[0-4]|25[0-5]</param>
+ <param name="pattern">((((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2]))|(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])-(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]))(,(((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2]))|(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])-(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])))*)?</param>
</data>
</attribute>
</optional>
@@ -229,7 +229,7 @@
<attribute name="req_resource_set_ipv6">
<data type="string">
<param name="maxLength">512000</param>
- <param name="pattern">::|(0|[1-9a-fA-F][0-9a-fA-F]{0,3}:){0,7}(:|0|[1-9a-fA-F][0-9a-fA-F]{0,3})-::|(0|[1-9a-fA-F][0-9a-fA-F]{0,3}:){0,7}(:|0|[1-9a-fA-F][0-9a-fA-F]{0,3})|::|(0|[1-9a-fA-F][0-9a-fA-F]{0,3}:){0,7}(:|0|[1-9a-fA-F][0-9a-fA-F]{0,3})/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])</param>
+ <param name="pattern">(((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))-(::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))|((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])))(,((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))-(::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))|((::|((0|[1-9a-fA-F][0-9a-fA-F]{0,3}):){0,7}(:|(0|[1-9a-fA-F][0-9a-fA-F]{0,3})))/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))))*)?</param>
</data>
</attribute>
</optional>
@@ -263,9 +263,30 @@
</define>
<define name="error_response">
<element name="status">
- <data type="positiveInteger">
- <param name="maxInclusive">999999999999999</param>
- </data>
+ <choice>
+ <value>1101</value>
+ <!-- Message too old -->
+ <value>1102</value>
+ <!-- msg_ref value is invalid -->
+ <value>1103</value>
+ <!-- out of order msg_ref value -->
+ <value>1104</value>
+ <!-- version number error -->
+ <value>1105</value>
+ <!-- unrecognised request type -->
+ <value>1201</value>
+ <!-- request - no such resource class -->
+ <value>1202</value>
+ <!-- request - no resources allocated in resource class -->
+ <value>1203</value>
+ <!-- request - badly formed certificate request -->
+ <value>1301</value>
+ <!-- revoke - no such resource class -->
+ <value>1302</value>
+ <!-- revoke - no such key -->
+ <value>2001</value>
+ </choice>
+ <!-- Internal Server Error - Request not performed -->
</element>
<optional>
<element name="last_msg_processed">