title: XML signature: Verify that all required elements have been signed
body: <p>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.</p>
  
  <p>Is it possible to make this distinction in C# .NET (ie do step (1)) and how would you go about this?</p>
  
  <p>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.</p>