This topic has not yet been rated - Rate this topic

SignedXml.SignatureFormatValidator Property

Gets a delegate that will be called to validate the format (not the cryptographic security) of an XML signature.

Namespace:  System.Security.Cryptography.Xml
Assembly:  System.Security (in System.Security.dll)
public Func<SignedXml, bool> SignatureFormatValidator { get; set; }

Property Value

Type: System.Func<SignedXml, Boolean>
true if the format is acceptable; otherwise, false.

This method can be used to ensure that only certain transforms are used, or that the signature uses a certain hash algorithm, and so on.

Setting the property to null removes all signature format validation from the SignedXml object.

You can also read the object's current delegate and chain to it if you want.

If you are setting up a format validator, the delegate you supply will receive as an input parameter the SignedXml object being verified and returns a Boolean value – true if the format is acceptable, false if it is not. If the delegate returns false for any reason, the SignedXml object will report that the XML signature is not valid.

.NET Framework

Supported in: 4.5, 4

.NET Framework Client Profile

Supported in: 4

Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.