EDN Admin
Well-known member
I have a xml signature that needs to be validated. It has the following SignatureInfo:
<div style="color:Black;background-color:White; <pre>
<span style="color:Blue; <<span style="color:#A31515; SignedInfo<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; CanonicalizationMethod <span style="color:Red; Algorithm<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://www.w3.org/2001/10/xml-exc-c14n#WithComments<span style="color:Black; "<span style="color:Blue; />
<span style="color:Blue; <<span style="color:#A31515; SignatureMethod <span style="color:Red; Algorithm<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://www.w3.org/2000/09/xmldsig#rsa-sha1<span style="color:Black; "<span style="color:Blue; />
<span style="color:Blue; <<span style="color:#A31515; Reference <span style="color:Red; URI<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; #id25a415d3-0a11-11e1-8266-00016c9cc847<span style="color:Black; " <span style="color:Red; Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://www.w3.org/2000/09/xmldsig#SignatureProperties<span style="color:Black; "<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; Transforms<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; Transform <span style="color:Red; Algorithm<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://www.w3.org/2001/10/xml-exc-c14n#WithComments<span style="color:Black; "<span style="color:Blue; />
<span style="color:Blue; </<span style="color:#A31515; Transforms<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; DigestMethod <span style="color:Red; Algorithm<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://www.w3.org/2000/09/xmldsig#sha1<span style="color:Black; "<span style="color:Blue; />
<span style="color:Blue; <<span style="color:#A31515; DigestValue<span style="color:Blue; >zaDeegM89/0QicIjiiBKKjCs3oA=<span style="color:Blue; </<span style="color:#A31515; DigestValue<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; Reference<span style="color:Blue; >
<Reference URI="
<span style="color:Blue; <<span style="color:#A31515; Transforms<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; Transform <span style="color:Red; Algorithm<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://www.w3.org/2002/06/xmldsig-filter2<span style="color:Black; "<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; XPath <span style="color:Red; Filter<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; intersect<span style="color:Black; " <span style="color:Red; xmlns<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://www.w3.org/2002/06/xmldsig-filter2<span style="color:Black; " <span style="color:Red; xmlns:a<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://e-porezna.porezna-uprava.hr/sheme/zahtjevi/ObrazacTZ/v1-1<span style="color:Black; " <span style="color:Red; xmlns:dsig<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://www.w3.org/2000/09/xmldsig#<span style="color:Black; "<span style="color:Blue; >here()/ancestor::dsig:Signature[1]/../../a:ObrazacTZ[1]//. | here()/ancestor::dsig:Signature[1]/../../a:ObrazacTZ[1]//@* | here()/ancestor::dsig:Signature[1]/../../a:ObrazacTZ[1]//namespace::*<span style="color:Blue; </<span style="color:#A31515; XPath<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; Transform<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; Transform <span style="color:Red; Algorithm<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://www.w3.org/2001/10/xml-exc-c14n#WithComments<span style="color:Black; "<span style="color:Blue; />
<span style="color:Blue; </<span style="color:#A31515; Transforms<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; DigestMethod <span style="color:Red; Algorithm<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://www.w3.org/2000/09/xmldsig#sha1<span style="color:Black; "<span style="color:Blue; />
<span style="color:Blue; <<span style="color:#A31515; DigestValue<span style="color:Blue; >oSUPjbPFV8PyhQN/Sp3k2LHgd8o=<span style="color:Blue; </<span style="color:#A31515; DigestValue<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; Reference<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; SignedInfo<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; br<span style="color:Blue; /><span style="color:Blue; <<span style="color:#A31515; br<span style="color:Blue; /><span style="color:Blue; <<span style="color:#A31515; br<span style="color:Blue; />
[/code]
<br/>
Can this be validated in .NET 2.0 (or higher)?
It seems that "xml-exc-c14n#WithComments" and "http://www.w3.org/2002/06/xmldsig-filter2" transforms are not supported.
If they are, how can I do the validation?
If not, are there any external tools, classes etc. ?
Any help appreciated.
View the full article
<div style="color:Black;background-color:White; <pre>
<span style="color:Blue; <<span style="color:#A31515; SignedInfo<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; CanonicalizationMethod <span style="color:Red; Algorithm<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://www.w3.org/2001/10/xml-exc-c14n#WithComments<span style="color:Black; "<span style="color:Blue; />
<span style="color:Blue; <<span style="color:#A31515; SignatureMethod <span style="color:Red; Algorithm<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://www.w3.org/2000/09/xmldsig#rsa-sha1<span style="color:Black; "<span style="color:Blue; />
<span style="color:Blue; <<span style="color:#A31515; Reference <span style="color:Red; URI<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; #id25a415d3-0a11-11e1-8266-00016c9cc847<span style="color:Black; " <span style="color:Red; Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://www.w3.org/2000/09/xmldsig#SignatureProperties<span style="color:Black; "<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; Transforms<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; Transform <span style="color:Red; Algorithm<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://www.w3.org/2001/10/xml-exc-c14n#WithComments<span style="color:Black; "<span style="color:Blue; />
<span style="color:Blue; </<span style="color:#A31515; Transforms<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; DigestMethod <span style="color:Red; Algorithm<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://www.w3.org/2000/09/xmldsig#sha1<span style="color:Black; "<span style="color:Blue; />
<span style="color:Blue; <<span style="color:#A31515; DigestValue<span style="color:Blue; >zaDeegM89/0QicIjiiBKKjCs3oA=<span style="color:Blue; </<span style="color:#A31515; DigestValue<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; Reference<span style="color:Blue; >
<Reference URI="
<span style="color:Blue; <<span style="color:#A31515; Transforms<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; Transform <span style="color:Red; Algorithm<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://www.w3.org/2002/06/xmldsig-filter2<span style="color:Black; "<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; XPath <span style="color:Red; Filter<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; intersect<span style="color:Black; " <span style="color:Red; xmlns<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://www.w3.org/2002/06/xmldsig-filter2<span style="color:Black; " <span style="color:Red; xmlns:a<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://e-porezna.porezna-uprava.hr/sheme/zahtjevi/ObrazacTZ/v1-1<span style="color:Black; " <span style="color:Red; xmlns:dsig<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://www.w3.org/2000/09/xmldsig#<span style="color:Black; "<span style="color:Blue; >here()/ancestor::dsig:Signature[1]/../../a:ObrazacTZ[1]//. | here()/ancestor::dsig:Signature[1]/../../a:ObrazacTZ[1]//@* | here()/ancestor::dsig:Signature[1]/../../a:ObrazacTZ[1]//namespace::*<span style="color:Blue; </<span style="color:#A31515; XPath<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; Transform<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; Transform <span style="color:Red; Algorithm<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://www.w3.org/2001/10/xml-exc-c14n#WithComments<span style="color:Black; "<span style="color:Blue; />
<span style="color:Blue; </<span style="color:#A31515; Transforms<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; DigestMethod <span style="color:Red; Algorithm<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://www.w3.org/2000/09/xmldsig#sha1<span style="color:Black; "<span style="color:Blue; />
<span style="color:Blue; <<span style="color:#A31515; DigestValue<span style="color:Blue; >oSUPjbPFV8PyhQN/Sp3k2LHgd8o=<span style="color:Blue; </<span style="color:#A31515; DigestValue<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; Reference<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; SignedInfo<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; br<span style="color:Blue; /><span style="color:Blue; <<span style="color:#A31515; br<span style="color:Blue; /><span style="color:Blue; <<span style="color:#A31515; br<span style="color:Blue; />
[/code]
<br/>
Can this be validated in .NET 2.0 (or higher)?
It seems that "xml-exc-c14n#WithComments" and "http://www.w3.org/2002/06/xmldsig-filter2" transforms are not supported.
If they are, how can I do the validation?
If not, are there any external tools, classes etc. ?
Any help appreciated.
View the full article