verify

Checks the validity of a signature.

Syntax

Reference_Syntax.verify( OBJECT param1 [, BOOLEAN param2 [, OBJECT param3 [, OBJECT param4 ] ] ] )

Parameters

param1

input

A valid XML signature node.

param2 (Optional)

input (Optional)

  • true | 1 (JavaScript) or 1 (FormCalc) (default)

  • Indicates that a dialog box is used for this operation.

  • false | 0 (JavaScript) or 0 (FormCalc)

  • Indicates that a dialog box is not used for this operation.

param3 (Optional)

input (Optional)

The SecurityHandler object that is used to sign. Security objects normally require initialization before they can be used for signing.

param4 (Optional)

output (Optional)

An output SignatureInfo object containing the writable properties of the signature.

Returns

An integer representing the validity of the signature or an exception if the node is not a signature node. The following table describes the validity values:

Value

Description

0

Signature is blank.

1

Unknown status. In this case, no attempt to validate the signature was made. One possible cause is a software or hardware issue that is preventing the validation from occurring.

2

Signature is invalid.

3

Signature is valid, but the identity of the signer could not be verified.

4

Signature is valid and the identity of the signer is valid.

Applies to

Version

XFA 2.1

Examples

JavaScript

//This example examines the validity of all signed objects on a form. For 
//each signed object, the integer return value of the verify() method 
// displays in a message box. 
var oSigs = xfa.signature.enumerate(); 
var iNum = oSigs.length; 
for (var i=0; i < iNum; i++)  
{ 
    var oChild = oSigs.item(i); 
    var iVerify = xfa.signature.signer(child); 
    xfa.host.messageBox(iVerify); 
}

FormCalc

//This example examines the validity of all signed objects on a form. For 
//each signed object, the integer return value of the verify() method 
// displays in a message box. 
var oSigs = xfa.signature.enumerate() 
var iNum = oSigs.length - 1 
for i=0 upto iNum step 1 do 
    var oChild = oSigs.item(i) 
    var iVerify = xfa.signature.signer(child) 
    xfa.host.messageBox(iVerify) 
endfor

// Ethnio survey code removed