Commit 4d797f17 authored by Jonathon Duerig's avatar Jonathon Duerig

Made signatures optional. Changed <capability_name> to <name>. Fixed test1.xml...

Made signatures optional. Changed <capability_name> to <name>. Fixed test1.xml and test2.xml to fulfill this new schema as per Leigh.
parent 58d825e3
......@@ -26,7 +26,7 @@ include "../rspec/protogeni-rspec-common.rnc"
## Representation of a single capability.
CapabilitySpec = element capability {
# Name of the capability.
element capability_name { xsd:string { minLength = "1" }},
element name { xsd:string { minLength = "1" }},
# Flag indicating this capability can be delegated
element can_delegate { xsd:boolean }
}
......@@ -74,7 +74,7 @@ credentials = element credential {
SignedCredential = element signed-credential {
credentials,
signatures
signatures?
}
start = SignedCredential
......@@ -32,12 +32,12 @@
<xs:element name="capability">
<xs:complexType>
<xs:sequence>
<xs:element ref="credential:capability_name"/>
<xs:element ref="credential:name"/>
<xs:element name="can_delegate" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="capability_name">
<xs:element name="name">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
......@@ -143,7 +143,7 @@
<xs:complexContent>
<xs:extension base="credential:credentials">
<xs:sequence>
<xs:element ref="credential:signatures"/>
<xs:element minOccurs="0" ref="credential:signatures"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<signed-credential xmlns="http://www.protogeni.net/resources/credential/0.1" xmlns:sig="http://www.w3.org/2000/09/xmldsig#">
<credential xml:id="Ref1">
<type>capability</type>
<serial>0</serial>
<owner_uuid>foo bar</owner_uuid>
<this_uuid>foo bar</this_uuid>
<capabilities>
<capability>
<capability_name>frazzle</capability_name>
<name>frazzle</name>
<can_delegate>1</can_delegate>
</capability>
</capabilities>
</credential>
</signed-credential>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<signed-credential>
<signed-credential xmlns="http://www.protogeni.net/resources/credential/0.1" xmlns:sig="http://www.w3.org/2000/09/xmldsig#">
<credential xml:id="Ref2">
<type>capability</type>
<serial>2</serial>
<owner_uuid>foo bar</owner_uuid>
<this_uuid>foo bar</this_uuid>
<capabilities>
<capability>
<capability_name>frazzle</capability_name>
<name>frazzle</name>
<can_delegate>1</can_delegate>
</capability>
<capability>
<capability_name>drazzle</capability_name>
<name>drazzle</name>
<can_delegate>1</can_delegate>
</capability>
</capabilities>
<parent>
<credential xml:id="Ref1">
<type>capability</type>
<serial>3</serial>
<owner_uuid>foo bar</owner_uuid>
<this_uuid>foo bar</this_uuid>
<capabilities>
<capability>
<capability_name>frazzle</capability_name>
<name>frazzle</name>
<can_delegate>1</can_delegate>
</capability>
</capabilities>
......@@ -46,9 +48,9 @@ kDDvwDHIkP8WlWF+Pk1NJNZRpmUFLtPdRG2DTWG/ySwp8UBJRLgkSno7N5ULmbxm
pA74Pi0YLOq2yLJpdm+HdDa1uqpI7YSgMSPoEUqTVX0=</SignatureValue>
<KeyInfo>
<X509Data>
<X509Certificate>MIIEAzCCA2ygAwIBAgIBADANBgkqhkiG9w0BAQQFADCBuDELMAkGA1UEBhMCVVMx
DTALBgNVBAgTBFV0YWgxFzAVBgNVBAcTDlNhbHQgTGFrZSBDaXR5MR0wGwYDVQQK
ExRVdGFoIE5ldHdvcmsgVGVzdGJlZDEeMBwGA1UECxMVQ2VydGlmaWNhdGUgQXV0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment