diff options
author | Rob Austein <sra@hactrn.net> | 2014-02-21 02:05:36 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2014-02-21 02:05:36 +0000 |
commit | a25c336c1d7752b60a251fcce51f2fbd81d930bf (patch) | |
tree | 51d7cadf92d447a8f22d7ea00ce618ad9305ea83 /rpkid/rpki/relaxng.py | |
parent | 401bbea99c1ba43ae0987b6346c65293a8efafa0 (diff) |
Add router certificate support to yamltest, rpkic, etc.
svn path=/branches/tk671/; revision=5680
Diffstat (limited to 'rpkid/rpki/relaxng.py')
-rw-r--r-- | rpkid/rpki/relaxng.py | 48 |
1 files changed, 30 insertions, 18 deletions
diff --git a/rpkid/rpki/relaxng.py b/rpkid/rpki/relaxng.py index f69968be..a7553d51 100644 --- a/rpkid/rpki/relaxng.py +++ b/rpkid/rpki/relaxng.py @@ -2366,31 +2366,43 @@ router_certificate = lxml.etree.RelaxNG(lxml.etree.fromstring(r'''<?xml version= <param name="pattern">.*Z</param> </data> </define> - <!-- Core PDU used in this schema. --> - <define name="router_certificate_request"> - <element name="router_certificate_request"> - <attribute name="router_id"> - <ref name="router_id"/> - </attribute> - <attribute name="asn"> - <ref name="asn_list"/> + <!-- Core payload used in this schema. --> + <define name="payload"> + <attribute name="router_id"> + <ref name="router_id"/> + </attribute> + <attribute name="asn"> + <ref name="asn_list"/> + </attribute> + <optional> + <attribute name="valid_until"> + <ref name="timestamp"/> </attribute> - <optional> - <attribute name="valid_until"> - <ref name="timestamp"/> - </attribute> - </optional> - <ref name="base64"/> - </element> + </optional> + <ref name="base64"/> </define> + <!-- + We allow two forms, one with a wrapper to allow multiple requests in + a single file, one without for brevity; the version attribute goes + in the outermost element in either case. + --> <start combine="choice"> - <ref name="router_certificate_request"/> + <element name="router_certificate_request"> + <attribute name="version"> + <ref name="version"/> + </attribute> + <ref name="payload"/> + </element> </start> - <!-- Wrapper element to support multiple requests in a single document. --> <start combine="choice"> <element name="router_certificate_requests"> + <attribute name="version"> + <ref name="version"/> + </attribute> <zeroOrMore> - <ref name="router_certificate_request"/> + <element name="router_certificate_request"> + <ref name="payload"/> + </element> </zeroOrMore> </element> </start> |