Debian Codegraph @

src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/signature.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE Envelope [
3 <!ENTITY dsig "http://www.w3.org/2000/09/xmldsig#">
4 <!ENTITY c14n "http://www.w3.org/TR/2001/REC-xml-c14n-20010315">
5 <!ENTITY xpath "http://www.w3.org/TR/1999/REC-xpath-19991116">
6 <!ENTITY xslt "http://www.w3.org/TR/1999/REC-xslt-19991116">
7 <!ATTLIST Notaries Id ID #IMPLIED>
8 ]>
9 <!-- Preamble -->
10 <Envelope xmlns:foo="http://www.usps.gov/foo" xmlns="http://www.usps.gov/">
11 <DearSir>foo</DearSir>
12 <Body>bar</Body>
13 <YoursSincerely>
14 <Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="signature">
15 <SignedInfo>
16 <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
17 <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
18 <Reference URI="http://www.w3.org/TR/xml-stylesheet">
19 <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
20 <DigestValue>60NvZvtdTB+7UnlLp/H24p7h4bs=</DigestValue>
21 </Reference>
22 <Reference URI="http://xmldsig.pothole.com/xml-stylesheet.txt">
23 <Transforms>
24 <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#base64" />
25 </Transforms>
26 <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
27 <DigestValue>60NvZvtdTB+7UnlLp/H24p7h4bs=</DigestValue>
28 </Reference>
29 <Reference Type="http://www.w3.org/2000/09/xmldsig#Object" URI="#object-1">
30 <Transforms>
31 <Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
32 <XPath>
33 self::text()
34 </XPath>
35 </Transform>
36 </Transforms>
37 <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
38 <DigestValue>zyjp8GJOX69990Kkqw8ioPXGExk=</DigestValue>
39 </Reference>
40 <Reference Type="http://www.w3.org/2000/09/xmldsig#Object" URI="">
41 <Transforms>
42 <Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
43 <XPath xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
44 ancestor-or-self::dsig:SignedInfo
45 and
46 count(ancestor-or-self::dsig:Reference |
47 here()/ancestor::dsig:Reference[1]) &gt;
48 count(ancestor-or-self::dsig:Reference)
49 or
50 count(ancestor-or-self::node() |
51 id('notaries')) =
52 count(ancestor-or-self::node())
53 </XPath>
54 </Transform>
55 </Transforms>
56 <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
57 <DigestValue>DkRNHKuQgDiTy9XAAMGbyydg3BI=</DigestValue>
58 </Reference>
59 <Reference Type="http://www.w3.org/2000/09/xmldsig#Object" URI="#object-2">
60 <Transforms>
61 <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#base64" />
62 </Transforms>
63 <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
64 <DigestValue>zyjp8GJOX69990Kkqw8ioPXGExk=</DigestValue>
65 </Reference>
66 <Reference Type="http://www.w3.org/2000/09/xmldsig#Manifest" URI="#manifest-1">
67 <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
68 <DigestValue>X9dMPL0KeDZXh9GE3vLcOtPsYjI=</DigestValue>
69 </Reference>
70 <Reference Type="http://www.w3.org/2000/09/xmldsig#SignatureProperties" URI="#signature-properties-1">
71 <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
72 <DigestValue>7tHLZrC0kqOhPCiYu/WusgG4tBo=</DigestValue>
73 </Reference>
74 <Reference URI="">
75 <Transforms>
76 <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
77 </Transforms>
78 <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
79 <DigestValue>zbVZy3ycg7CyFcPzNs0C6bA3qio=</DigestValue>
80 </Reference>
81 <Reference URI="">
82 <Transforms>
83 <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
84 <Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments" />
85 </Transforms>
86 <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
87 <DigestValue>zbVZy3ycg7CyFcPzNs0C6bA3qio=</DigestValue>
88 </Reference>
89 <Reference URI="#xpointer(/)">
90 <Transforms>
91 <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
92 </Transforms>
93 <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
94 <DigestValue>zbVZy3ycg7CyFcPzNs0C6bA3qio=</DigestValue>
95 </Reference>
96 <Reference URI="#xpointer(/)">
97 <Transforms>
98 <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
99 <Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments" />
100 </Transforms>
101 <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
102 <DigestValue>ar0/7EQyRfUZmrPPcTQFdVCt2PY=</DigestValue>
103 </Reference>
104 <Reference Type="http://www.w3.org/2000/09/xmldsig#Object" URI="#object-3">
105 <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
106 <DigestValue>0aW4L0GoFzYUo4gyZSfoyZBhpuc=</DigestValue>
107 </Reference>
108 <Reference Type="http://www.w3.org/2000/09/xmldsig#Object" URI="#object-3">
109 <Transforms>
110 <Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments" />
111 </Transforms>
112 <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
113 <DigestValue>0aW4L0GoFzYUo4gyZSfoyZBhpuc=</DigestValue>
114 </Reference>
115 <Reference Type="http://www.w3.org/2000/09/xmldsig#Object" URI="#xpointer(id('object-3'))">
116 <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
117 <DigestValue>0aW4L0GoFzYUo4gyZSfoyZBhpuc=</DigestValue>
118 </Reference>
119 <Reference Type="http://www.w3.org/2000/09/xmldsig#Object" URI="#xpointer(id('object-3'))">
120 <Transforms>
121 <Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments" />
122 </Transforms>
123 <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
124 <DigestValue>1puYWb36Z5TIDmEIVd/JLR3iD8Y=</DigestValue>
125 </Reference>
126 <Reference Type="http://www.w3.org/2000/09/xmldsig#Reference" URI="#reference-2">
127 <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
128 <DigestValue>MMtXLCswiEDurKMgg2r+vBPlk8Q=</DigestValue>
129 </Reference>
130 <Reference Id="reference-1" Type="http://www.w3.org/2000/09/xmldsig#Reference" URI="#manifest-reference-1">
131 <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
132 <DigestValue>7eI/P8mppgkqXqW0+at2UGj06qs=</DigestValue>
133 </Reference>
134 <Reference Id="reference-2" Type="http://www.w3.org/2000/09/xmldsig#Reference" URI="#reference-1">
135 <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
136 <DigestValue>l/bqIouk6Gs8eEjG0Tad0MJJgWw=</DigestValue>
137 </Reference>
138 </SignedInfo>
139 <SignatureValue>
140 SiMb9su56spmMlNjrWWKdkgj1hDhveaWCx5Bwpj5AuJ6T3Zy68NJ/A==
141 </SignatureValue>
142 <KeyInfo>
143 <RetrievalMethod Type="http://www.w3.org/2000/09/xmldsig#X509Data" URI="#object-4">
144 <Transforms>
145 <Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
146 <XPath xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
147 ancestor-or-self::dsig:X509Data
148 </XPath>
149 </Transform>
150 </Transforms>
151 </RetrievalMethod>
152 </KeyInfo>
153 <Object Id="object-1" MimeType="text/plain">I am the text.</Object>
154 <Object Encoding="http://www.w3.org/2000/09/xmldsig#base64" Id="object-2" MimeType="text/plain">SSBhbSB0aGUgdGV4dC4=</Object>
155 <Object Id="object-3">
156 <NonCommentandus xmlns=""><!-- Commentandum --></NonCommentandus>
157 </Object>
158 <Object>
159 <Manifest Id="manifest-1">
160 <Reference Id="manifest-reference-1" URI="http://www.w3.org/TR/xml-stylesheet">
161 <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
162 <DigestValue>60NvZvtdTB+7UnlLp/H24p7h4bs=</DigestValue>
163 </Reference>
164 <Reference Type="http://www.w3.org/2000/09/xmldsig#Reference" URI="#reference-1">
165 <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
166 <DigestValue>l/bqIouk6Gs8eEjG0Tad0MJJgWw=</DigestValue>
167 </Reference>
168 <Reference URI="#notaries">
169 <Transforms>
170 <Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116">
171 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/TR/xhtml1/strict" exclude-result-prefixes="foo" version="1.0">
172 <xsl:output encoding="UTF-8" indent="no" method="xml" />
173 <xsl:template match="/">
174 <html>
175 <head>
176 <title>Notaries</title>
177 </head>
178 <body>
179 <table>
180 <xsl:for-each select="Notaries/Notary">
181 <tr>
182 <th>
183 <xsl:value-of select="@name" />
184 </th>
185 </tr>
186 </xsl:for-each>
187 </table>
188 </body>
189 </html>
190 </xsl:template>
191 </xsl:stylesheet>
192 </Transform>
193 <Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
194 </Transforms>
195 <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
196 <DigestValue>c7wq5XKos6RqNVJyFy7/fl6+sAs=</DigestValue>
197 </Reference>
198 </Manifest>
199 </Object>
200 <Object>
201 <SignatureProperties Id="signature-properties-1">
202 <SignatureProperty Target="#signature">
203 <SignerAddress xmlns="urn:demo"><IP>192.168.21.138</IP></SignerAddress>
204 </SignatureProperty>
205 </SignatureProperties>
206 </Object>
207 <Object Id="object-4">
208 <X509Data>
209 <X509SubjectName>
210 CN=Merlin Hughes,O=Baltimore Technologies\, Ltd.,ST=Dublin,C=IE
211 </X509SubjectName>
212 <X509IssuerSerial>
213 <X509IssuerName>
214 CN=Test DSA CA,O=Baltimore Technologies\, Ltd.,ST=Dublin,C=IE
215 </X509IssuerName>
216 <X509SerialNumber>970849936</X509SerialNumber>
217 </X509IssuerSerial>
218 <X509Certificate>
219 MIIDNzCCAvWgAwIBAgIEOd3+kDAJBgcqhkjOOAQDMFsxCzAJBgNVBAYTAklFMQ8w
220 DQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9yZSBUZWNobm9sb2dpZXMs
221 IEx0ZC4xFDASBgNVBAMTC1Rlc3QgRFNBIENBMB4XDTAwMTAwNjE2MzIxNVoXDTAx
222 MTAwNjE2MzIxNFowXTELMAkGA1UEBhMCSUUxDzANBgNVBAgTBkR1YmxpbjElMCMG
223 A1UEChMcQmFsdGltb3JlIFRlY2hub2xvZ2llcywgTHRkLjEWMBQGA1UEAxMNTWVy
224 bGluIEh1Z2hlczCCAbYwggErBgcqhkjOOAQBMIIBHgKBgQDaJjfDTrawMHf8MiUt
225 Y54b37hSmYNnR3KpGT10uU1Dqppcju06uN0iGbqf947DjkBC25hKnqykK31xBw0E
226 CPbYq/KC98kghdf2xJCu6B8aqJ95K9jdVflJ3WP7PQxJn+fmM23zy6HYLXVICpfq
227 etdNj/VHCShZE3bdJiE6VobSFQIVAPQecqS2PaTDprcQnkwx4MHTRXhrAoGAMuGA
228 lqeB1ax+vyO2+Osubjhl7pHxLu47RIH+/M52DjESA9KMSrwzsYx8yNR2WooByrE0
229 t6fu0VncK7UK8olO4t7wpv2z4AFQPRVCKFwo0qgn5aKIkICGMlrRy81avb27wGcW
230 othx3iPPMtFXtoDqK0JItaI9R8zc1msFhM1GKMYDgYQAAoGActA8YGxrtngg/zKV
231 vqEOefnwmViFztcnPBYPlJsvh6yKI4iDm68fnp4Mi3RrJ6bZAygFrUIQLxLjV+OJ
232 tgJAEto0xAs+Mehuq1DkSFEpP3oDzCTOsrOiS1DwQe4oIb7zVk/9l7aPtJMHW0LV
233 lMdwZNFNNJoqMcT2ZfCPrfvYvQ2jRzBFMB4GA1UdEQQXMBWBE21lcmxpbkBiYWx0
234 aW1vcmUuaWUwDgYDVR0PAQH/BAQDAgeAMBMGA1UdIwQMMAqACEJZQG0KwRbPMAkG
235 ByqGSM44BAMDMQAwLgIVAK4skWEFYgrggaJA8vYAwSjg12+KAhUAwHTo7wd4tENw
236 9LAKPklQ/74fH18=
237 </X509Certificate>
238 </X509Data>
239 </Object>
240 </Signature>
241 </YoursSincerely>
242 <PostScript>bar</PostScript>
243 <Notaries xmlns="" Id="notaries">
244 <Notary name="Great, A. T." />
245 <Notary name="Hun, A. T." />
246 </Notaries>
247 <!-- Commentary -->
248 </Envelope>
249 <!-- Postamble -->