SignedXml.SignatureFormatValidator Property

Definition

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

public:
 property Func<System::Security::Cryptography::Xml::SignedXml ^, bool> ^ SignatureFormatValidator { Func<System::Security::Cryptography::Xml::SignedXml ^, bool> ^ get(); void set(Func<System::Security::Cryptography::Xml::SignedXml ^, bool> ^ value); };
public Func<System.Security.Cryptography.Xml.SignedXml,bool> SignatureFormatValidator { get; set; }
member this.SignatureFormatValidator : Func<System.Security.Cryptography.Xml.SignedXml, bool> with get, set
Public Property SignatureFormatValidator As Func(Of SignedXml, Boolean)

Property Value

true if the format is acceptable; otherwise, false.

Remarks

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.

Applies to