2

I'm implementing the verification of an XML signature. In the (I wish it was more) technical document I'm using there's a distinction between (1) a verification as to whether all required elements of the message (which is specified with an xpointer through the Reference Uri) have been signed and (2) the verification of the signature itself.

Is it possible to make this distinction in C# .NET (ie do step (1)) and how would you go about this?

The only thing I can come up with is check the Reference Uri in the SignedXML class (via the SignedInfo property). The problem with this is that you can never be sure whether the correct CustomSignedXML (which you need for overriding the GetIdElement method) has been used to generate the signature.

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
Johan Maes
  • 1,161
  • 13
  • 13

0 Answers0