Share via


XML Digital Signature Verification with Unknown URI Schemes

A few years back, there was a discussion thread on one of my XML digital signature posts about verifying an XML digital signature which had references to a URI prefixed with cid:.  Recently Mattias Lindberg ran into this problem as well, and devised a clever solution to it.

Mattias realized that SignedXml uses WebRequest.Create to help resolve what the reference points to.  And since WebRequest is extensible, he registered a custom class to handle cid URLs.  Although his specific example is for cid, this technique will work for any other protocol that the .NET Framework does not know how to handle out of the box.