New to Telerik Document ProcessingStart a free 30-day trial

Signature Validation

Updated on Jun 22, 2026

The validation runs for the current field and checks against the state of the document at the moment of import. Because it depends on the file bytes, the source stream must remain open.

The Signature class exposes two methods for validating a signature:

MethodDescription
Validate()Accepts a SignatureValidationProperties parameter and validates the signature using those properties. Returns a SignatureValidationResult.
TryValidate()Returns a bool indicating whether validation succeeded. The first overload accepts an out parameter containing a SignatureValidationResult; the second overload also accepts SignatureValidationProperties.

Validation Properties

The SignatureValidationProperties class exposes the following properties:

PropertyDescription
ChainGets or sets the chain used to validate the certificate that signed the digital signature. Of type X509Chain.
ChainStatusFlagsGets or sets the chain status flags that describe the used signature certificate as not valid. Of type X509ChainStatusFlags.

The validation requires that the stream from which the document is imported remains open. The validation runs for the current field and checks against the state of the document at the moment of import.

Validation Result

The Validate() and TryValidate() methods return a SignatureValidationResult that describes the outcome of the verification. The following table lists its properties:

PropertyTypeDescription
FieldNamestringThe name of the signature form field associated with this result.
IsDocumentModifiedboolIndicates whether the signed byte ranges were altered after signing.
IsCertificateValidboolIndicates whether the signing certificate builds a valid chain. Check CertificatesChainElements for details when the certificate is invalid.
CertificatesX509Certificate2CollectionThe certificates included with the signature, used to validate the chain.
CertificatesChainElementsX509ChainElementCollectionChain elements produced during validation that describe any issues with the certificate path.
SignerInformationstringSigner information, typically the name or entity extracted from the signature.
HashAlgorithmOidThe hash algorithm OID used to compute the message digest for this signature.
HashAlgorithmNamestringThe friendly name of the hash algorithm (for example, SHA1 or SHA256), falling back to the OID value string when no friendly name is available. Returns null when HashAlgorithm is not set.

The following example shows how to validate a signature field:

PdfProcessing Validate Digital Signature Demo

Example 1: Validate a Field

C#
RadFixedDocument document = new PdfFormatProvider().Import(File.OpenRead("file-to-import.pdf"), TimeSpan.FromSeconds(10)); // The stream containing the document

string validationStatus;

//For simplicity, the example handles only the first signature.
SignatureField firstSignatureField = document.AcroForm.FormFields.FirstOrDefault(field => field.FieldType == FormFieldType.Signature) as SignatureField;
if (firstSignatureField != null && firstSignatureField.Signature != null)
{
    SignatureValidationProperties properties = new SignatureValidationProperties();
    System.Security.Cryptography.X509Certificates.X509VerificationFlags verificationFlags = System.Security.Cryptography.X509Certificates.X509VerificationFlags.IgnoreInvalidName;
    properties.Chain.ChainPolicy.VerificationFlags = verificationFlags;

    SignatureValidationResult validationResult;
    if (firstSignatureField.Signature.TryValidate(properties, out validationResult))
    {
        if (!validationResult.IsDocumentModified)
        {
            if (validationResult.IsCertificateValid)
            {
                validationStatus = "Valid";
            }
            else
            {
                validationStatus = "Unknown";
            }
        }
        else
        {
            validationStatus = "Invalid";
        }
    }
    else
    {
        validationStatus = "Invalid";
    }
}
else
{
    validationStatus = "None";
}

To evaluate a certificate as trusted, add it to the trusted certificates on your machine.

See Also