Class PdfSignatureValidationResult
Specifies the signatures's validation result.
Inheritance
Inherited Members
Namespace: Syncfusion.Pdf.Security
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public class PdfSignatureValidationResult
Examples
// Loads an existing document
PdfLoadedDocument document = new PdfLoadedDocument(fileName);
// Gets the signature field
PdfLoadedSignatureField signatureField = document.Form.Fields[0] as PdfLoadedSignatureField;
// Validate signature and get validation result
PdfSignatureValidationResult result = signatureField.ValidateSignature();
// Close the document
document.Close(true);
' Loads an existing document
Dim document As PdfLoadedDocument = New PdfLoadedDocument(fileName)
' Gets the signature field
Dim signatureField As PdfLoadedSignatureField = document.Form.Fields[0] As PdfLoadedSignatureField
' Validate signature and get validation result
Dim result As PdfSignatureValidationResult = signatureField.ValidateSignature()
' Close the document
document.Close(true)
Constructors
PdfSignatureValidationResult()
Declaration
public PdfSignatureValidationResult()
Properties
Certificates
Gets the list of certificates in the signature
Declaration
public X509Certificate2Collection Certificates { get; }
Property Value
Type | Description |
---|---|
System.Security.Cryptography.X509Certificates.X509Certificate2Collection |
Examples
// Loads an existing document
PdfLoadedDocument document = new PdfLoadedDocument(fileName);
// Gets the signature field
PdfLoadedSignatureField signatureField = document.Form.Fields[0] as PdfLoadedSignatureField;
// Validate signature and get validation result
PdfSignatureValidationResult result = signatureField.ValidateSignature();
// Gets the list of certificates in the signature
X509Certificate2Collection certificates = result.Certificates;
// Close the document
document.Close(true);
' Loads an existing document
Dim document As PdfLoadedDocument = New PdfLoadedDocument(fileName)
' Gets the signature field
Dim signatureField As PdfLoadedSignatureField = document.Form.Fields[0] As PdfLoadedSignatureField
' Validate signature and get validation result
Dim result As PdfSignatureValidationResult = signatureField.ValidateSignature()
' Gets the list of certificates in the signature
Dim certificates As X509Certificate2Collection = result.Certificates
' Close the document
document.Close(true)
CryptographicStandard
Gets the cryptographic standard used in the signature
Declaration
public CryptographicStandard CryptographicStandard { get; }
Property Value
Type | Description |
---|---|
CryptographicStandard |
Examples
// Loads an existing document
PdfLoadedDocument document = new PdfLoadedDocument(fileName);
// Gets the signature field
PdfLoadedSignatureField signatureField = document.Form.Fields[0] as PdfLoadedSignatureField;
// Validate signature and get validation result
PdfSignatureValidationResult result = signatureField.ValidateSignature();
// Gets the cryptographic standard used in the signature
CryptographicStandard cryptographicStandard = result.CryptographicStandard;
// Close the document
document.Close(true);
' Loads an existing document
Dim document As PdfLoadedDocument = New PdfLoadedDocument(fileName)
' Gets the signature field
Dim signatureField As PdfLoadedSignatureField = document.Form.Fields[0] As PdfLoadedSignatureField
' Validate signature and get validation result
Dim result As PdfSignatureValidationResult = signatureField.ValidateSignature()
' Gets the cryptographic standard used in the signature
Dim cryptographicStandard As CryptographicStandard = result.CryptographicStandard
' Close the document
document.Close(true)
DigestAlgorithm
Gets the digestion algorithm used in the signature
Declaration
public DigestAlgorithm DigestAlgorithm { get; }
Property Value
Type | Description |
---|---|
DigestAlgorithm |
Examples
// Loads an existing document
PdfLoadedDocument document = new PdfLoadedDocument(fileName);
// Gets the signature field
PdfLoadedSignatureField signatureField = document.Form.Fields[0] as PdfLoadedSignatureField;
// Validate signature and get validation result
PdfSignatureValidationResult result = signatureField.ValidateSignature();
// Gets the digestion algorithm used in the signature
DigestAlgorithm digestAlgorithm = result.DigestAlgorithm;
// Close the document
document.Close(true);
' Loads an existing document
Dim document As PdfLoadedDocument = New PdfLoadedDocument(fileName)
' Gets the signature field
Dim signatureField As PdfLoadedSignatureField = document.Form.Fields[0] As PdfLoadedSignatureField
' Validate signature and get validation result
Dim result As PdfSignatureValidationResult = signatureField.ValidateSignature()
' Gets the digestion algorithm used in the signature
Dim digestAlgorithm As DigestAlgorithm = result.DigestAlgorithm
' Close the document
document.Close(true)
IsCertificated
Gets a value to check whether the signature is certificated or not
Declaration
public bool IsCertificated { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Examples
// Loads an existing document
PdfLoadedDocument document = new PdfLoadedDocument(fileName);
// Gets the signature field
PdfLoadedSignatureField signatureField = document.Form.Fields[0] as PdfLoadedSignatureField;
// Validate signature and get validation result
PdfSignatureValidationResult result = signatureField.ValidateSignature();
// Checks whether the signature is certificated or not
bool isCertificated = result.IsCertificated;
// Close the document
document.Close(true);
' Loads an existing document
Dim document As PdfLoadedDocument = New PdfLoadedDocument(fileName)
' Gets the signature field
Dim signatureField As PdfLoadedSignatureField = document.Form.Fields[0] As PdfLoadedSignatureField
' Validate signature and get validation result
Dim result As PdfSignatureValidationResult = signatureField.ValidateSignature()
' Checks whether the signature is certificated or not
Dim isCertificated As Boolean = result.IsCertificated
' Close the document
document.Close(true)
IsDocumentModified
Gets a value to check whether the document is modified or not
Declaration
public bool IsDocumentModified { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Examples
// Loads an existing document
PdfLoadedDocument document = new PdfLoadedDocument(fileName);
// Gets the signature field
PdfLoadedSignatureField signatureField = document.Form.Fields[0] as PdfLoadedSignatureField;
// Validate signature and get validation result
PdfSignatureValidationResult result = signatureField.ValidateSignature();
// Checks whether the document is modified or not
bool isDocumentModified = result.IsDocumentModified;
// Close the document
document.Close(true);
' Loads an existing document
Dim document As PdfLoadedDocument = New PdfLoadedDocument(fileName)
' Gets the signature field
Dim signatureField As PdfLoadedSignatureField = document.Form.Fields[0] As PdfLoadedSignatureField
' Validate signature and get validation result
Dim result As PdfSignatureValidationResult = signatureField.ValidateSignature()
' Checks whether the document is modified or not
Dim isDocumentModified As Boolean = result.IsDocumentModified
' Close the document
document.Close(true)
IsSignatureValid
Gets a value to check whether the signature is valid or not
Declaration
public bool IsSignatureValid { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Examples
// Loads an existing document
PdfLoadedDocument document = new PdfLoadedDocument(fileName);
// Gets the signature field
PdfLoadedSignatureField signatureField = document.Form.Fields[0] as PdfLoadedSignatureField;
// Validate signature and get validation result
PdfSignatureValidationResult result = signatureField.ValidateSignature();
// Checks whether the signature is valid or not
bool isSignatureValid = result.IsSignatureValid;
// Close the document
document.Close(true);
' Loads an existing document
Dim document As PdfLoadedDocument = New PdfLoadedDocument(fileName)
' Gets the signature field
Dim signatureField As PdfLoadedSignatureField = document.Form.Fields[0] As PdfLoadedSignatureField
' Validate signature and get validation result
Dim result As PdfSignatureValidationResult = signatureField.ValidateSignature()
' Checks whether the signature is valid or not
Dim isSignatureValid As Boolean = result.IsSignatureValid
' Close the document
document.Close(true)
IsValidAtCurrentTime
Gets a value to check whether the signature valid at current time
Declaration
public bool IsValidAtCurrentTime { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Examples
// Loads an existing document
PdfLoadedDocument document = new PdfLoadedDocument(fileName);
// Gets the signature field
PdfLoadedSignatureField signatureField = document.Form.Fields[0] as PdfLoadedSignatureField;
// Validate signature and get validation result
PdfSignatureValidationResult result = signatureField.ValidateSignature();
// Checks whether the signature is valid at current time
bool isValidAtCurrentTime = result.IsValidAtCurrentTime;
// Close the document
document.Close(true);
' Loads an existing document
Dim document As PdfLoadedDocument = New PdfLoadedDocument(fileName)
' Gets the signature field
Dim signatureField As PdfLoadedSignatureField = document.Form.Fields[0] As PdfLoadedSignatureField
' Validate signature and get validation result
Dim result As PdfSignatureValidationResult = signatureField.ValidateSignature()
' Checks whether the signature is valid at current time
Dim isValidAtCurrentTime As Boolean = result.IsValidAtCurrentTime
' Close the document
document.Close(true)
IsValidAtSignedTime
Gets a value to check whether the signature valid at signed time
Declaration
public bool IsValidAtSignedTime { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Examples
// Loads an existing document
PdfLoadedDocument document = new PdfLoadedDocument(fileName);
// Gets the signature field
PdfLoadedSignatureField signatureField = document.Form.Fields[0] as PdfLoadedSignatureField;
// Validate signature and get validation result
PdfSignatureValidationResult result = signatureField.ValidateSignature();
// Checks whether the signature is valid at the time of signing
bool isValidAtSignedTime = result.IsValidAtSignedTime;
// Close the document
document.Close(true);
' Loads an existing document
Dim document As PdfLoadedDocument = New PdfLoadedDocument(fileName)
' Gets the signature field
Dim signatureField As PdfLoadedSignatureField = document.Form.Fields[0] As PdfLoadedSignatureField
' Validate signature and get validation result
Dim result As PdfSignatureValidationResult = signatureField.ValidateSignature()
' Checks whether the signature is valid at the time of signing
Dim isValidAtSignedTime As Boolean = result.IsValidAtSignedTime
' Close the document
document.Close(true)
IsValidAtTimeStampTime
Gets a value to check whether the signature valid at timestamp time
Declaration
public bool IsValidAtTimeStampTime { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Examples
// Loads an existing document
PdfLoadedDocument document = new PdfLoadedDocument(fileName);
// Gets the signature field
PdfLoadedSignatureField signatureField = document.Form.Fields[0] as PdfLoadedSignatureField;
// Validate signature and get validation result
PdfSignatureValidationResult result = signatureField.ValidateSignature();
// Checks whether the signature is valid at timestamp time
bool isValidAtTimeStampTime = result.IsValidAtTimeStampTime;
// Close the document
document.Close(true);
' Loads an existing document
Dim document As PdfLoadedDocument = New PdfLoadedDocument(fileName)
' Gets the signature field
Dim signatureField As PdfLoadedSignatureField = document.Form.Fields[0] As PdfLoadedSignatureField
' Validate signature and get validation result
Dim result As PdfSignatureValidationResult = signatureField.ValidateSignature()
' Checks whether the signature is valid at timestamp time
Dim isValidAtTimeStampTime As Boolean = result.IsValidAtTimeStampTime
' Close the document
document.Close(true)
LtvVerificationInfo
Gets the signature LTV verification details.
Declaration
public LtvVerificationInfo LtvVerificationInfo { get; }
Property Value
Type | Description |
---|---|
LtvVerificationInfo |
Examples
// Loads an existing document
PdfLoadedDocument document = new PdfLoadedDocument(fileName);
// Gets the signature field
PdfLoadedSignatureField signatureField = document.Form.Fields[0] as PdfLoadedSignatureField;
// Validate signature and get validation result
PdfSignatureValidationResult result = signatureField.ValidateSignature();
// Gets the LTV verification details
LtvVerificationInfo ltvVerificationInfo = result.LtvVerificationInfo;
// Close the document
document.Close(true);
' Loads an existing document
Dim document As PdfLoadedDocument = New PdfLoadedDocument(fileName)
' Gets the signature field
Dim signatureField As PdfLoadedSignatureField = document.Form.Fields[0] As PdfLoadedSignatureField
' Validate signature and get validation result
Dim result As PdfSignatureValidationResult = signatureField.ValidateSignature()
' Gets the LTV verification details
Dim ltvVerificationInfo As LtvVerificationInfo = result.LtvVerificationInfo
' Close the document
document.Close(true)
RevocationResult
Gets the resultant data of certificate revocation validation.
Declaration
public RevocationResult RevocationResult { get; }
Property Value
Type | Description |
---|---|
RevocationResult |
Examples
// Loads an existing document
PdfLoadedDocument document = new PdfLoadedDocument(fileName);
// Gets the signature field
PdfLoadedSignatureField signatureField = document.Form.Fields[0] as PdfLoadedSignatureField;
// Validate signature and get validation result
PdfSignatureValidationResult result = signatureField.ValidateSignature();
// Gets the revocation result
RevocationResult revocationResult = result.RevocationResult;
// Gets the value indicating whether the CRL is revoked or not
bool hasRevokedCrl = revocationResult.IsRevokedCRL;
// Gets the OCSP revocation status
RevocationStatus revocationStatus = revocationResult.OcspRevocationStatus;
// Close the document
document.Close(true);
' Loads an existing document
Dim document As PdfLoadedDocument = New PdfLoadedDocument(fileName)
' Gets the signature field
Dim signatureField As PdfLoadedSignatureField = document.Form.Fields[0] As PdfLoadedSignatureField
' Validate signature and get validation result
Dim result As PdfSignatureValidationResult = signatureField.ValidateSignature()
' Gets the revocation result
Dim revocationResult As RevocationResult = result.RevocationResult
' Gets the value indicating whether the CRL is revoked or not
Dim hasRevokedCrl As Boolean = revocationResult.IsRevokedCRL
' Gets the OCSP revocation status
Dim revocationStatus As RevocationStatus = revocationResult.OcspRevocationStatus
' Close the document
document.Close(true)
SignatureAlgorithm
Gets the signature algorithm used
Declaration
public string SignatureAlgorithm { get; }
Property Value
Type | Description |
---|---|
System.String |
Examples
// Loads an existing document
PdfLoadedDocument document = new PdfLoadedDocument(fileName);
// Gets the signature field
PdfLoadedSignatureField signatureField = document.Form.Fields[0] as PdfLoadedSignatureField;
// Validate signature and get validation result
PdfSignatureValidationResult result = signatureField.ValidateSignature();
// Gets the signature algorithm used
string signatureAlgorithm = result.SignatureAlgorithm;
// Close the document
document.Close(true);
' Loads an existing document
Dim document As PdfLoadedDocument = New PdfLoadedDocument(fileName)
' Gets the signature field
Dim signatureField As PdfLoadedSignatureField = document.Form.Fields[0] As PdfLoadedSignatureField
' Validate signature and get validation result
Dim result As PdfSignatureValidationResult = signatureField.ValidateSignature()
' Gets the signature algorithm used
Dim signatureAlgorithm As string = result.SignatureAlgorithm
' Close the document
document.Close(true)
SignatureName
Gets the name of the signature field.
Declaration
public string SignatureName { get; }
Property Value
Type | Description |
---|---|
System.String |
Examples
// Loads an existing document
PdfLoadedDocument document = new PdfLoadedDocument(fileName);
// Gets the signature field
PdfLoadedSignatureField signatureField = document.Form.Fields[0] as PdfLoadedSignatureField;
// Validate signature and get validation result
PdfSignatureValidationResult result = signatureField.ValidateSignature();
// Gets the name of the signature field
string name = result.SignatureName;
// Close the document
document.Close(true);
' Loads an existing document
Dim document As PdfLoadedDocument = New PdfLoadedDocument(fileName)
' Gets the signature field
Dim signatureField As PdfLoadedSignatureField = document.Form.Fields[0] As PdfLoadedSignatureField
' Validate signature and get validation result
Dim result As PdfSignatureValidationResult = signatureField.ValidateSignature()
' Gets the name of the signature field
Dim name As string = result.SignatureName
' Close the document
document.Close(true)
SignatureStatus
Gets the certificate's verification status.
Declaration
public SignatureStatus SignatureStatus { get; }
Property Value
Type | Description |
---|---|
SignatureStatus |
Examples
// Loads an existing document
PdfLoadedDocument document = new PdfLoadedDocument(fileName);
// Gets the signature field
PdfLoadedSignatureField signatureField = document.Form.Fields[0] as PdfLoadedSignatureField;
// Validate signature and get validation result
PdfSignatureValidationResult result = signatureField.ValidateSignature();
// Gets the signature validation status
SignatureStatus status = result.SignatureStatus;
// Close the document
document.Close(true);
' Loads an existing document
Dim document As PdfLoadedDocument = New PdfLoadedDocument(fileName)
' Gets the signature field
Dim signatureField As PdfLoadedSignatureField = document.Form.Fields[0] As PdfLoadedSignatureField
' Validate signature and get validation result
Dim result As PdfSignatureValidationResult = signatureField.ValidateSignature()
' Gets the signature validation status
Dim status As SignatureStatus = result.SignatureStatus
' Close the document
document.Close(true)
SignatureValidationErrors
Declaration
public List<PdfSignatureValidationException> SignatureValidationErrors { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<PdfSignatureValidationException> |
TimeStampInformation
Gets the timestamp information from the signature
Declaration
public TimeStampInformation TimeStampInformation { get; }
Property Value
Type | Description |
---|---|
TimeStampInformation |
Examples
// Loads an existing document
PdfLoadedDocument document = new PdfLoadedDocument(fileName);
// Gets the signature field
PdfLoadedSignatureField signatureField = document.Form.Fields[0] as PdfLoadedSignatureField;
// Validate signature and get validation result
PdfSignatureValidationResult result = signatureField.ValidateSignature();
// Gets the timestamp information from the signature
TimeStampInformation timeStampInformation = result.TimeStampInformation;
// Close the document
document.Close(true);
' Loads an existing document
Dim document As PdfLoadedDocument = New PdfLoadedDocument(fileName)
' Gets the signature field
Dim signatureField As PdfLoadedSignatureField = document.Form.Fields[0] As PdfLoadedSignatureField
' Validate signature and get validation result
Dim result As PdfSignatureValidationResult = signatureField.ValidateSignature()
' Gets the timestamp information from the signature
Dim timeStampInformation As TimeStampInformation = result.TimeStampInformation
' Close the document
document.Close(true)