Skip to content

Commit a552009

Browse files
johanlundbergc00kiemon5ter
authored andcommitted
add xenc-schema-11.xsd to schema validator
original url: https://www.w3.org/TR/xmlenc-core1/xenc-schema-11.xsd
1 parent 811f441 commit a552009

File tree

2 files changed

+119
-0
lines changed

2 files changed

+119
-0
lines changed
+117
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<!--
4+
#
5+
# Copyright ©[2011] World Wide Web Consortium
6+
# (Massachusetts Institute of Technology,
7+
# European Research Consortium for Informatics and Mathematics,
8+
# Keio University). All Rights Reserved.
9+
# This work is distributed under the W3C® Software License [1] in the
10+
# hope that it will be useful, but WITHOUT ANY WARRANTY; without even
11+
# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12+
# PURPOSE.
13+
# [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
14+
#
15+
-->
16+
17+
<!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSchema 200102//EN"
18+
"http://www.w3.org/2001/XMLSchema.dtd"
19+
[
20+
<!ATTLIST schema
21+
xmlns:xenc CDATA #FIXED 'http://www.w3.org/2001/04/xmlenc#'
22+
xmlns:ds CDATA #FIXED 'http://www.w3.org/2000/09/xmldsig#'
23+
xmlns:xenc11 CDATA #FIXED 'http://www.w3.org/2009/xmlenc11#'>
24+
<!ENTITY xenc 'http://www.w3.org/2001/04/xmlenc#'>
25+
<!ENTITY % p ''>
26+
<!ENTITY % s ''>
27+
]>
28+
29+
<schema xmlns='http://www.w3.org/2001/XMLSchema' version='1.0'
30+
xmlns:xenc='http://www.w3.org/2001/04/xmlenc#'
31+
xmlns:xenc11='http://www.w3.org/2009/xmlenc11#'
32+
xmlns:ds='http://www.w3.org/2000/09/xmldsig#'
33+
targetNamespace='http://www.w3.org/2009/xmlenc11#'
34+
elementFormDefault='qualified'>
35+
36+
<import namespace='http://www.w3.org/2000/09/xmldsig#'
37+
schemaLocation='http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd'/>
38+
39+
<import namespace='http://www.w3.org/2001/04/xmlenc#'
40+
schemaLocation='http://www.w3.org/TR/2002/REC-xmlenc-core-20021210/xenc-schema.xsd'/>
41+
42+
<element name="ConcatKDFParams" type="xenc11:ConcatKDFParamsType"/>
43+
<complexType name="ConcatKDFParamsType">
44+
<sequence>
45+
<element ref="ds:DigestMethod"/>
46+
</sequence>
47+
<attribute name="AlgorithmID" type="hexBinary"/>
48+
<attribute name="PartyUInfo" type="hexBinary"/>
49+
<attribute name="PartyVInfo" type="hexBinary"/>
50+
<attribute name="SuppPubInfo" type="hexBinary"/>
51+
<attribute name="SuppPrivInfo" type="hexBinary"/>
52+
</complexType>
53+
54+
<element name="DerivedKey" type="xenc11:DerivedKeyType"/>
55+
<complexType name="DerivedKeyType">
56+
<sequence>
57+
<element ref="xenc11:KeyDerivationMethod" minOccurs="0"/>
58+
<element ref="xenc:ReferenceList" minOccurs="0"/>
59+
<element name="DerivedKeyName" type="string" minOccurs="0"/>
60+
<element name="MasterKeyName" type="string" minOccurs="0"/>
61+
</sequence>
62+
<attribute name="Recipient" type="string" use="optional"/>
63+
<attribute name="Id" type="ID" use="optional"/>
64+
<attribute name="Type" type="anyURI" use="optional"/>
65+
</complexType>
66+
67+
<element name="KeyDerivationMethod" type="xenc11:KeyDerivationMethodType"/>
68+
<complexType name="KeyDerivationMethodType">
69+
<sequence>
70+
<any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
71+
</sequence>
72+
<attribute name="Algorithm" type="anyURI" use="required"/>
73+
</complexType>
74+
75+
<element name="PBKDF2-params" type="xenc11:PBKDF2ParameterType"/>
76+
77+
<complexType name="AlgorithmIdentifierType">
78+
<sequence>
79+
<element name="Parameters" type="anyType" minOccurs="0"/>
80+
</sequence>
81+
<attribute name="Algorithm" type="anyURI" use="required" />
82+
</complexType>
83+
84+
<complexType name="PRFAlgorithmIdentifierType">
85+
<complexContent>
86+
<restriction base="xenc11:AlgorithmIdentifierType">
87+
<attribute name="Algorithm" type="anyURI" use="required" />
88+
</restriction>
89+
</complexContent>
90+
</complexType>
91+
92+
<complexType name="PBKDF2ParameterType">
93+
<sequence>
94+
<element name="Salt">
95+
<complexType>
96+
<choice>
97+
<element name="Specified" type="base64Binary"/>
98+
<element name="OtherSource" type="xenc11:AlgorithmIdentifierType"/>
99+
</choice>
100+
</complexType>
101+
</element>
102+
<element name="IterationCount" type="positiveInteger"/>
103+
<element name="KeyLength" type="positiveInteger"/>
104+
<element name="PRF" type="xenc11:PRFAlgorithmIdentifierType"/>
105+
</sequence>
106+
</complexType>
107+
108+
<element name="MGF" type="xenc11:MGFType"/>
109+
<complexType name="MGFType">
110+
<complexContent>
111+
<restriction base="xenc11:AlgorithmIdentifierType">
112+
<attribute name="Algorithm" type="anyURI" use="required" />
113+
</restriction>
114+
</complexContent>
115+
</complexType>
116+
117+
</schema>

src/saml2/xml/schema/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ def _create_xml_schema_validator(source=None, **kwargs):
2323
path_schema_xml = str(schema_resources.joinpath("xml.xsd"))
2424
path_schema_envelope = str(schema_resources.joinpath("envelope.xsd"))
2525
path_schema_xenc = str(schema_resources.joinpath("xenc-schema.xsd"))
26+
path_schema_xenc_11 = str(schema_resources.joinpath("xenc-schema-11.xsd"))
2627
path_schema_xmldsig_core = str(schema_resources.joinpath("xmldsig-core-schema.xsd"))
2728
path_schema_saml_assertion = str(schema_resources.joinpath("saml-schema-assertion-2.0.xsd"))
2829
path_schema_saml_metadata = str(schema_resources.joinpath("saml-schema-metadata-2.0.xsd"))
@@ -39,6 +40,7 @@ def _create_xml_schema_validator(source=None, **kwargs):
3940
"http://www.w3.org/XML/1998/namespace": path_schema_xml,
4041
"http://schemas.xmlsoap.org/soap/envelope/": path_schema_envelope,
4142
"http://www.w3.org/2001/04/xmlenc#": path_schema_xenc,
43+
"http://www.w3.org/2009/xmlenc11#": path_schema_xenc_11,
4244
"http://www.w3.org/2000/09/xmldsig#": path_schema_xmldsig_core,
4345
"urn:oasis:names:tc:SAML:2.0:assertion": path_schema_saml_assertion,
4446
"urn:oasis:names:tc:SAML:2.0:metadata": path_schema_saml_metadata,

0 commit comments

Comments
 (0)